1

I am trying to improve my analytics implementation by including Enhanced Ecommerce data, but I can't seam to get it to work.

At first I am checking the product listings, and I have included the following code (taken from my View Source) - I've obviously changed my UA ID for this example.

ga('create', 'UA-MYID', 'auto');
ga('require', 'ec');
ga('ec:addImpression', {'id': 'SKU01238','name': 'Aspire Atlantis','category': 'Sub-Ohm Tanks','brand': 'Aspire','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01346','name': 'Aspire Triton','category': 'Sub-Ohm Tanks','brand': 'Aspire','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01476','name': 'Aspire Triton 2','category': 'Sub-Ohm Tanks','brand': 'Aspire','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01427','name': 'Cyclone Tank By Sense','category': 'Sub-Ohm Tanks','brand': 'Sense','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01485','name': 'Eleaf Melo 2','category': 'Sub-Ohm Tanks','brand': 'Eleaf','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01404','name': 'Herakles Hydra By Sense','category': 'Sub-Ohm Tanks','brand': 'Sense','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01529','name': 'Herakles Plus By Sense','category': 'Sub-Ohm Tanks','brand': 'Sense','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01320','name': 'Herakles Tank By Sense','category': 'Sub-Ohm Tanks','brand': 'Sense','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01533','name': 'Innokin Isub Apex Sub Ohm Tank','category': 'Sub-Ohm Tanks','brand': 'Innokin','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01303','name': 'Innokin Isub G Tank','category': 'Sub-Ohm Tanks','brand': 'Innokin','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01304','name': 'Innokin Isub Tank','category': 'Sub-Ohm Tanks','brand': 'Innokin','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01026','name': 'Kanger Subtank Mini','category': 'Sub-Ohm Tanks','brand': 'Kangertech','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01027','name': 'Kanger Subtank Nano','category': 'Sub-Ohm Tanks','brand': 'Kangertech','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01190','name': 'Kanger Subtank Plus','category': 'Sub-Ohm Tanks','brand': 'Kangertech','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01444','name': 'Morph Tank','category': 'Sub-Ohm Tanks','brand': '','list': 'Search Results'});
ga('ec:addImpression', {'id': 'SKU01409','name': 'Smok Tfv4 Full Kit','category': 'Sub-Ohm Tanks','brand': 'SMOK','list': 'Search Results'});
ga('send', 'pageview');

I've also tried removing all the ec:addImpression's and placed Google's own example code in and I still can't see anything updated in my Google Analytics Product List Performance page.

Otherwise my Google Tag Assistant (for Chrome) is showing that the Pageview Request is being sent fine and I can see my location on the dashboard.

Can anyone shed some light on this for me?

Thanks

Thomas Hughes
  • 99
  • 1
  • 11
  • 1
    You won't be able to see anything until the data has been processed which could take up to 24 hours. Try installing GA Debugger in Chrome and checking the hits. – nyuen Jan 15 '16 at 15:32

2 Answers2

1

Likely the data hasn't been processed as the code appears to be OK, having verified with GA Debugger and also in the network console. Just make sure you are given ample time for the data to be processed, which could be anywhere up to 24 hours.

nyuen
  • 8,829
  • 2
  • 21
  • 28
0

It looks like you're missing the list parameter from your impressions. Try something like this:

ga('ec:addImpression', {'id': 'SKU01409','name': 'Smok Tfv4 Full Kit', 'list': 'Category View'});

replacing 'Category View' with whatever your list is called.

  • Ah I took some of them out to simplify it for testing. I've updated my original post to show what I am sending now - and list is set to "Search Results" like it was on the example code. It still doesn't seam to be updating my analytics though. And interestingly, if I add 'position': 1 at the end then it stops sending the HTTP request all together... – Thomas Hughes Jan 15 '16 at 15:54
  • `list` isn't a required parameter for impressions, only `id` and `name` are. – nyuen Jan 15 '16 at 16:10
  • So i copied the code exactly as you wrote it and replaced my own and it's not showing any errors but still when I go to 'Product List Performance' it shows no data. – Thomas Hughes Jan 15 '16 at 16:11
  • Like I commented above, you won't be able to see the data right away in your GA reports as it takes anywhere up to 24 hours for the data to show up. You should install a tool like GA debugger and you would be able to see the hits go through. That said, I don't see anything wrong with the code, and I can see the hits being sent. – nyuen Jan 15 '16 at 16:13
  • Thanks nyuen. I've installed the GA debugger and it does seam to be sending fine. I assumed the results would be fairly instant. Hopefully all is well then. I'll post here again if there are any more issues. Thanks again – Thomas Hughes Jan 15 '16 at 16:27