Jump to content

Prestashop uses obsolete Google Analytics code


Recommended Posts

Prestashop uses obsolete Google Analytics code.

Here is a patch that works with my production site.

1. _gat._getTracker is deprecated as mentionned here : http://code.google.com/intl/fr-FR/apis/analytics/docs/gaJS/gaJSApi.html

2. _trackTrans() has to be inserted AFTER _trackPageview() not before.
http://code.google.com/intl/fr-FR/apis/analytics/docs/gaJS/gaJSApiEcommerce.html#_gat.GA_Tracker_._trackTrans

3. hookFooter() send 2 instances of _trackPageview() during orders (ganalytics.php line 137).

This is a duplicate of my bug tracker submission http://www.prestashop.com/bug_tracker/view/4872/ as the Bug Tracker interface doesn't display my patch and breaks code.

Here are the patch and the final module patched.

ganalytics.txtFetching info...

ganalytics.phpFetching info...

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...