Analytics
4.9K members online now
4.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Measuring Promotion Impressions - enhanced ecommerce - scrolling banner

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

I'm looking to measure promotion impressions for a banner on a site for enhanced ecommerce. However I am looking at the suggested code and it says

// An example of measuring promotion views. This example assumes that
// information about the promotions displayed is available when the page loads.

The information about the promotion is available but it is in a scrolling banner. So I don't want to load all of the data layer with all the promotions on the page load I want to be able to tell whether a users has seen that slide in the banner. the suggested code is below. does anyone know how I have to change the code to capture that. Do I have to get the DLO to reload every time the banner scrolls.

 

any help would be appreciated

 

<script>
dataLayer
.push({
 
'ecommerce': {
   
'promoView': {
     
'promotions': [                     // Array of promoFieldObjects.
       
{
         
'id': 'JUNE_PROMO13',            // ID or Name is required.
         
'name': 'June Sale',
         
'creative': 'banner1',
         
'position': 'slot1'
       
},
       
{
         
'id': 'FREE_SHIP13',
         
'name': 'Free Shipping Promo',
         
'creative': 'skyscraper1',
         
'position': 'slot2'
       
}]
   
}
 
}
});
</script>

Re: Measuring Promotion Impressions - enhanced ecommerce - scrolling banner

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

When banner is displaying just push data to dataLayer with custom event and send them to GA with event not with page view.

 

 

<script>
dataLayer.push({
  'event': 'promoView',
'ecommerce': { 'promoView': { 'promotions': [ // Array of promoFieldObjects. { 'id': 'JUNE_PROMO13', // ID or Name is required. 'name': 'June Sale', 'creative': 'banner1', 'position': 'slot1' }] } } }); </script>

 

Trigger configuration:

promoView.png

 

GA tag configuration:

ecommerceEvent.png

 

 

 

Re: Measuring Promotion Impressions - enhanced ecommerce - scrolling banner

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi 6S M,

 

One approach you could do would be to push a single promotions object into the dataLayer each time the banner scrolls either automatically or via user interaction. Additionally, you would also add in an event key:value pair, and fire off an event tag for that specific event (in this case you would create a trigger based on 'promoBanner'). This approach would give you the added benefit of tracking banner views using Event Category/Action/Label.

 

dataLayer.push({
  'event': 'promoBanner',
  'ecommerce': {
    'promoView': {
      'promotions': [                     // Array of promoFieldObjects.
       {
         'id': 'JUNE_PROMO13',            // ID or Name is required.
         'name': 'June Sale',
         'creative': 'banner1',
         'position': 'slot1'
       }]
    }
  }
});

 

Cheers,

 

Bogdan

 

Re: Measuring Promotion Impressions - enhanced ecommerce - scrolling banner

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thanks Guys,

Both these solutions make perfect sense and are really helpful. Much appreciated.

Cheers,

Simon

Re: Measuring Promotion Impressions - enhanced ecommerce - scrolling banner

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thanks Tomasz,

That's great!

Cheers,

Simon