jaspacio

GA UA Checkout Option

Oct 28th, 2020 (edited)
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. window.dataLayer = window.dataLayer || [];
  3. window.dataLayer.push({
  4.   event: 'checkoutOption',          // name of an event. In this case, always stays as checkoutOption
  5.   ecommerce: {                          // ecommerce object. This is the essential part of tracking. New EE data must always be pushed to this object
  6.     checkout_option: {                  // name of an action. In this case, always stays as checkout_option
  7.       actionField: {
  8.         step: step,                     // number of the checkout step in which a user chose an action for the delivery address - add, edit or delete
  9.         option: 'add'               // payment option that a visitor has chosen (add, edit or delete)
  10.       }
  11.     }
  12.   }
  13. });
  14. </script>
Add Comment
Please, Sign In to add comment