Analytics
3.1K members online now
3.1K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Pushing product list impressions on demand via GTM

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,

 

I'm trying to send product list impressions only when the product is visible in the viewport, and I am able to to get this working via a custom event and GTM. However, this results in the impressions not being listed in regular Product List Impressions - if I try to simply use: ga(‘ec:addImpression’, product); for each product as they become visible, I get errors due to ec not being defined at that point. If I try to ga('require' 'ec') on the same script where I use ga(‘ec:addImpression’..) I end up loading 'ec' twice as it's already being loaded.

 

Grateful for any pointers as just getting to grips with GTM and EEC!

 

1 Expert replyverified_user

Pushing product list impressions on demand via GTM

Top Contributor
# 2
Top Contributor

Hi, bsod99,

 

Would you be able to post the code you are using for your impressions? I'm not sure I fully understand the issue yet, and how the 'ec' plugin would become undefined. Thanks!

 

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Pushing product list impressions on demand via GTM

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Nicky Y, 

 

Thanks for the reply. Apologies for the lack of detail in the OP. Essentially I'm following this tutorial here for scroll based tracking: http://content.infotrustllc.com/how-to-setup-enhanced-ecommerce-impressions-the-right-way-using-scro...

 

In this tutorial, there is this line to push the impression:  ga(‘ec:addImpression’, product);

I'm using GTM and have set up a custom event that I can use to send the impression data to GA, via the following code, which contains the correct product parameters in the product variable:

dataLayer.push({
'event': 'product_in_viewport',
'impressions' : product
});

 This pushes the data up to GA but I don't have it in the Product List Impressions - is it possible to use GTM to use the addImpression event instead of a custom one?

Thanks!