Advertisement
JITreviso

ga4_eec | view_promotion

Aug 17th, 2022
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.dataLayer = window.dataLayer || [];
  2. window.dataLayer.push({
  3.   event: 'view_promotion',
  4.   ecommerce: {
  5.     items: [{
  6.       promotion_id: 'MLB_3829',                 // promotion ID
  7.       promotion_name: 'MLB_SUMMIT_SUMMER',       // name of the promo campaign
  8.       creative_name: '50_percent_off',      // main message of the banner
  9.       creative_slot: 'sidebar1',            // slot of the banner (there are multiple items in the same location, e.g. slider)
  10.       location_id: 'sidebar'                // location of the banner
  11.     },{
  12.       promotion_id: 'CHES_3824',
  13.       promotion_name: 'CHES_SUMMER22',
  14.       creative_name: '20_percent_off',
  15.       creative_slot: 'sidebar2',
  16.       location_id: 'sidebar'
  17.     }]
  18.   }
  19. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement