Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. jQuery(function($) {
  3.  
  4.                     $( '.single_add_to_cart_button' ).click( function() {
  5.                         ga( 'ec:addProduct', {'id': '11447-1483-BILET-EARLY-BIRD-BUCUREȘTI','name': 'Bilet București','quantity': $( 'input.qty' ).val() ? $( 'input.qty' ).val() : '1'} );
  6.                         ga( 'ec:setAction', 'add' );
  7.                         ga( 'send', 'event', 'UX bilet bucurest', 'click bilet bucuresti', 'add to cart bilet bucuresti' );
  8.                     });
  9.                
  10.  
  11.  
  12.             ga( 'ec:addProduct', {
  13.                 'id': '11447-1483-BILET-EARLY-BIRD-BUCUREȘTI',
  14.                 'name': 'Bilet București',
  15.                 'category': 'Bilete',
  16.                 'price': '290',
  17.             } );
  18.  
  19.             ga( 'ec:setAction', 'detail' );
  20.  
  21.  
  22.                     $( '.add_to_cart_button:not(.product_type_variable, .product_type_grouped)' ).click( function() {
  23.                         ga( 'ec:addProduct', {'id': ($(this).data('product_sku')) ? ($(this).data('product_sku')) : ('#' + $(this).data('product_id')),'quantity': $(this).data('quantity')} );
  24.                         ga( 'ec:setAction', 'add' );
  25.                         ga( 'send', 'event', 'UX bilet bucuresti', 'click bilet bucuresti', 'add to cart bilet bucuresti' );
  26.                     });
  27.                
  28.  
  29. ga( 'send', 'pageview' );
  30.  });
  31. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement