AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3.1K members online now
3.1K 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

Impression Tracking Randomly Fails on Webshop Pages

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, and thanks for reading!

 

Recently I implemented Analytic's Enhanced Ecommerce functionality on our webshop. We are using a hosted webshop solution with a CMS. The tracking code for each category result list is thus consistently generated in the same manner. However on some webpages the tracking fails for no apparent reason. The tag assistant just gives the unhelpful message of "No HTTP Response Detected" and no tracking data is submitted at all. Strangely, on most sites it works just fine and even more misteriously, on some of these pages it works for a while and then stops working again...

 

I changed it so the pageview gets transmitted in any case, with the ecommerce impression data sent as a non-interaction event. However, on the same pages the pageview wouldn't get transmitted, no event is tracked either according to the tag assistant. One problem was with those articles that had a ' character in their name, but that was fixed. Any other special characters i need to be aware of? Character limits in any of the fields? Below is an excerpt of how the javascript code looks on a page where tracking doesn't work (at the moment):

 

<script>
ga('ec:addImpression', {          
		'id': '136090',                   	
		'name': 'iPhone 6 Plus/6S Plus LOVE MEI MK2 Robuste Metall, Silikon und Echtleder Case Hülle - weiss',	
		'category': 'Apple/iPhone 6 Plus/iPhone 6 Plus Cases/Metall Case',
		'list': 'Category Result: Apple/iPhone 6 Plus/iPhone 6 Plus Cases',
		'position': 1,
		'price': 45.90
	});
	function ProductClick136090() {
		ga('ec:addProduct', {
			'id': '136090',                   	
			'name': 'iPhone 6 Plus/6S Plus LOVE MEI MK2 Robuste Metall, Silikon und Echtleder Case Hülle - weiss',	
			'category': 'Apple/iPhone 6 Plus/iPhone 6 Plus Cases/Metall Case',
			'position': 1,
			'price': 45.90
		});
 		ga('ec:setAction', 'click', {'list': 'Category Result: Apple/iPhone 6 Plus/iPhone 6 Plus Cases'});
		// Send click with an event, then send user to product page.
		ga('send', 'event', 'UX', 'click', 'Results', {
			hitCallback: function() {
			document.location = 'https://www.mobile-universe.ch/apple/iphone-6-plus/cases/iphone-6-plus-6s-plus-love-mei-mk2-robuste-metall-silikon-und-echtleder-case-huelle-weiss/a-136090/';
			}
	  	});
	}

....

ga('send','event','Ecommerce','Impressions','Category List',{nonInteraction: true});
</script>

The page is https://www.mobile-universe.ch/apple/iphone-6-plus/cases/ , Analytics tracking code can be found at Line 77 (for the tracker object and pageview) and at Line 2987 (for the impression tracking) when viewing the page source on Google Chrome (accessed via right-click).

 

Thanks for any and all help!

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Andreas H
January 2016

Re: Impression Tracking Randomly Fails on Webshop Pages

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭
You can easily debug on the website with GA debugger:
https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna

You can check in chrome, console tab with 'Preserve log' turned ON.

I tried and it gives:

Running command: ga("send", "event", "Ecommerce", "Impressions", "Category List", {nonInteraction: true})
Error: type={0: "len", 1: 8232} method= message= account=

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Andreas H
January 2016

Re: Impression Tracking Randomly Fails on Webshop Pages

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭
You can easily debug on the website with GA debugger:
https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna

You can check in chrome, console tab with 'Preserve log' turned ON.

I tried and it gives:

Running command: ga("send", "event", "Ecommerce", "Impressions", "Category List", {nonInteraction: true})
Error: type={0: "len", 1: 8232} method= message= account=

Re: Impression Tracking Randomly Fails on Webshop Pages

A T
Participant ✭ ✭ ✭
# 3

Re: Impression Tracking Randomly Fails on Webshop Pages

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thanks, I didn't know a tool like this existed.

Re: Impression Tracking Randomly Fails on Webshop Pages

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Yes, that is indeed the problem, though sometimes the tag assistant seems to miss a hit which went through. Thanks for your help.