fooman / googleanalyticsplus

Magento Extension to add extra features to the default GoogleAnalytics module.
http://store.fooman.co.nz/extensions/magento-extension-googleanalyticsplus.html
100 stars 53 forks source link

ecomm variables causing error. #82

Closed Mel007 closed 8 years ago

Mel007 commented 8 years ago

In the latest release the ecomm prodid is coming through which is great. But on a category page (with no product and no price), I think we have a missing '', before the closing brace. This is causing a js error.

var google_tag_params = { ecomm_prodid: '', ecomm_pagetype: 'category', ecomm_totalvalue: };

fooman commented 8 years ago

@Mel007 when you say latest release are you referring to the latest tagged version or latest commit? With this change here https://github.com/fooman/googleanalyticsplus/commit/a988c8a4fe754319cd17e1edf582ec748bce287d ecomm_totalvalue should not be displayed at all any more.

Mel007 commented 8 years ago

not too sure.. I downloaded from https://github.com/fooman/googleanalyticsplus/archive/master.zip to update the version I had installed on my site.

I looked at a988c8a and they've replaced ' ' with false ... but that would probably result in what I am seeing... i.e. the tag name is still being listed and only the value is being hidden. maybe Google mean the whole tag should be hidden? as missing quotes is causing an error. You can see this page as an example: https://www.topfurnitureshop.co.uk/bedroom/bedroom-furniture/bedside-tables.html

fooman commented 8 years ago

I see - can you try changing this https://github.com/fooman/googleanalyticsplus/blob/master/app/design/frontend/base/default/template/fooman/googleanalyticsplus/remarketing.phtml#L23 to

<?php if($pageValue !== false):?>
Mel007 commented 8 years ago

Ok, that has removed the tag and therfore the error message, thanks!

I'm also looking at enhanced ecommerce in Google Analytics. I don't believe your extension tracks these tags does it?

specs are here https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

Thanks! Mel

fooman commented 8 years ago

Hi Mel, thanks for confirming. No we do not support enhanced ecommerce.