Google Analytics - Product impressions on utag.link

jasperjansen
Visitor
jasperjansen

Hi all,

 

The standard way to setup product impressions is to add all the variables in utag_data. By doing this, you'll send all impressions at once to Google Analytics, so also the products that are not visible on the page. To solve this, I'm trying to send product impressions with an utag.link once the products are visible. This works, but the enh_impression_list is not filled correctly. I hope someone can help me out?!

 

This is what I did:

 

utag.link({

  event_name : 'product_impression',    

  enh_action : 'product_impression',                

  imp_list_name : ['list-category','list-category','list-category'],             

  imp_id : ['123','456','789'],                              

  imp_name : ['Top 1','Top 2','Top 3l'],                             

  imp_price : ['24.99','12.99','1.99'],                          

  imp_position : ['1','2','3'],                         

});

 

I've mapped all these variables in the Google Universal Analytics tag:

A494D205-C9D0-47AF-9420-4DFE2B9D86F5.png 

 

 

I've made sure that an event is send to GA by mapping event Category, Action and Label when enh_action is product_impression.

 

5B9A9351-7FFE-43DC-B95E-C49350DE505F.png

 

When I test this in our test environment, all the variable are send correctly to GA, except for imp_list_name. Did I miss a step somewhere?

 

Any tips are welcome :)

 

Thanks!

 

9 REPLIES 9

Google Analytics - Product impressions on utag.link

JohanAlm
Contributor
JohanAlm

Hi @jasperjansen.

From what I see you have the correct setup. I have done what you are trying to do and it is working for my reporting. Could you upload a screen of the result, from the networks tab or Observpoint chrome extension maybe? In my testing I managed to get a few different results based on the values set in the utag.link call and it would be easier to understand your issue with more information on your results.

 

//Johan

 

 

Google Analytics - Product impressions on utag.link

jasperjansen
Visitor
jasperjansen

Hi @JohanAlm

 

Thanks for testing. Here's my network call after the utag.link:

F45EBB3C-802C-4B2B-9AAF-C3B32B4FFC92.png

Google Analytics - Product impressions on utag.link

STerjeson
Regular Visitor
STerjeson Regular Visitor

@jasperjansen Have you tried adding any of the other product impression variables? Perhaps there is a dependency of Category or Position in order for the List to fire? Would have to go through the tag template code to check probably unless one of the dev's knows.

 

https://community.tealiumiq.com/t5/Tags/Google-Universal-Analytics-Tag-Enhanced-E-Commerce/ta-p/279#...

 

I would test adding Brand, Price, Position, and Category just to check quickly.

Highlighted

Google Analytics - Product impressions on utag.link

JohanAlm
Contributor
JohanAlm

@jasperjansen

In my implementation I didn't need to add anything beyond imp_id and imp_list_name, eveything else was optional. But there could be different versions of the utag.loader template or the GA tag template that have different settings. My template versions are as follows. GA: //~~tv:7110.20170223. UTAG.loader: utag.loader ut4.42. These are not the latest versions as it has been updated quite recently. You could check your versions, and if possible update to the newest ones, unless you have any custom code in them that you must keep. 

I would suggest doing a break point debugging of the values as well, to follow the imp_list_name variable and see if and where it changes. It seems all other values are carried through correctly except that one. I tried to see if I could, but your site is of course behind login as it should. I can say that using your utag.link call on my site (with a minor change to the variable names) worked as expected and the GA call looked correct with the list in place.

 

Google Analytics - Product impressions on utag.link

jasperjansen
Visitor
jasperjansen

Here's the breakpoint:

A4574645-C93D-46E5-8295-DC118265392D.png

 

You can see clearly that enh_impression_list is empty.

 

I've also tested a breakpoint at the mapping part, all going fine:

 

119A4595-DE6A-4369-BB7E-6CBF6F12C064.png

 

I don't know how to follow a variable in the console, could you explain?

Google Analytics - Product impressions on utag.link

JohanAlm
Contributor
JohanAlm

When doing a break point debug, set the breakpoint at the part of the code that would first look at the incomming utag.link call with you variable. How to ocate this is of course depending on how you have set up your code. For instance, if you have an extension that manipulates the enh_impression_list variable that is where you should start. As soon as the break stops the rendering of the code, located the variable you need and and right click, select Add selected text to watch (different naming in different Chrome versions). FOr this to work you often need to mark the entire b.imp_list_name part, same if you are using a a brcket notation variable (b["variabel_name"].

add_to_watch.png

Once you do this, you can find your variable in the upper right corner of the web tools. As you see, I have . few that I am following currently. The fact that they are undefined simply says that what I am running this example on doesn't apply.

So when you have marked the variable for Watch, find a location where your utag.link is executed and run the break point debug on this server call.

watch_list.png

And from there, use the Step into button and just take one code row at a time to see when and where the variable changes.

step_through.png

 

Give it a try and see if you can spot the break. If you do, look at that code and try to see why it is empty for you. 

Google Analytics - Product impressions on utag.link

AndreScholten
Visitor
AndreScholten

Jasper: I see a space in the "imp_list_name ". Remove that and see what happens.

Freelance Web Analist

Google Analytics - Product impressions on utag.link

jasperjansen
Visitor
jasperjansen

@AndreScholten Wow, great find! There was a space in the UDO variable name. I've removed it and it's working perfectly now :) Thanks a lot!

Google Analytics - Product impressions on utag.link

ksugam
Visitor
ksugam

Hello All,

I have a similar issue. For the product details page, once the page loads, the product data isn't available in the data layer and hence the developers have added a "utag.link" on page with updated data layer that has product related variables along with "tealium_event" with value "product details".

How do we trigger additional GA call once the utag.link triggers on the page?