dusanmiha

GA4 - view_promotion

Oct 1st, 2021 (edited)
347
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: 'abc123',                             // Required. Promotion Campaign ID - Type: String
  7.       promotion_name: 'summer_promo',                     // Required. Promotion Campaign Name - Type: String
  8.       creative_name: 'family_in_bathing_suits_1',         // Promotion Creative Name - Type: String
  9.       creative_slot: '1',                                 // Promotion Creative Slot - Type: Integer
  10.       location_id: 'hero_banner'                          // Promotion Creative Location ID - Type: String
  11.     },{
  12.       promotion_id: 'wc2020',
  13.       promotion_name: 'winter_campaign_2020',
  14.       creative_name: 'family_in_winter_clothes_1',
  15.       creative_slot: '2',
  16.       location_id: 'hero_banner'
  17.     }]
  18.   }
  19. });
Add Comment
Please, Sign In to add comment