Setting up Google Analytics for Prestashop

Prestashop has a wide variety of statistics, but if you need real in-depth marketing and SEO analysis for your store, you need Google Analytics. Let’s set it up with Prestashop!

Setting up Google Analytics

Quite obviously, as first step we need a google analytics account. If you don’t have one, reach the Google Analytics main page and sign up for one.

As soon as it’s created, reach the account settings page, then in the property panel, if you don’t have any, select Create new Property.

Fill in your data, then hit Get tracking ID. On the new page you will see the main tracking ID, usually starting with UA- followed by numbers. This is the only piece of information we need, the rest (the javascriptt tracking code) can be ignored as the Prestashop Google Analytics module already has it.

The Prestashop Google Analytics Module

In the Prestashop back office, reach the Modules panel, then look for Google Analytics using the filter box on the top left. If nothing shows up, chances are the module is named ganalytics, so try that one as well. Once you locate it, hit install.

Prestashop google analytics module

There is one single configuration parameter to input, your tracking id. Paste it, then make sure “Universal analytics active” is ticked, as all new Google Analytics accounts use it as standard (more about Google Universal Analytics).

The base setup is done! However, since Google Analytics has many features tailored specifically for Ecommerce, let’s have a look at how to set them up more in depth.

Enabling Ecommerce reports

If you really want to take advantage of the power of Google Analytics, you need to keep track of your sales. Therefore, the next step will be enabling Ecommerce analytics for your store. From the main Google Analytics admin panel, select a property (the one you created before), then click Ecommerce settings. Set the status to enabled, then click next. At this point you are given the chance to enable the new Enhanced Ecommerce Analytics, however Prestashop currently loads the default ecommerce javascript tracker, which is not compatible with the new property (as you can read in the official doc: Important: The Enhanced Ecommerce plug-in should not be used alongside the Ecommerce (ecommerce.js) plug-in for the same property.).

Setting up Google Analytics for Prestashop

Despite this, the default Ecommerce statistics are good enough for the vast majority of merchants.

Once data is collected (it might take a few days, at least the next one for sure), you will be able to see your Ecommerce analytics in the main Statistics reports, under Conversions, Ecommerce.

Setting up Goals

In the end, it might be worth to setup conversion goals to check if your website needs refinement, and eventually identify bottlenecks.

That given, Prestashop comes with its own instructions on how to set them up… which are unfortunately not working anymore, as they reference a file structure deprecated since Prestashop 1.5.

Therefore, we need to figure out page names by ourselves. Please notice the url will have to be adjusted depending on your usage of Friendly Urls, especially if you use custom structures.

Example: How to track destination pages

If you just started an ad campaign where you want to make sure your customers follow a certain path, it’s worth creating a goal to track the various click-throughs of your customers before they reach a certain product page.

From the admin panel (where we enabled Ecommerce Analytics) click on Goals. Then create a new goal, name it and set its type as destination. Next, it’s necessary to add the page you want to track the reach out of. Google doesn’t need the tld ( so we can simply add the folder/page part of the url. In my case, I wanted to track the destination page, so I simply added /prestest/blouses/2-blouse.html. If your site is in the domain’s root, you can use /blouses/2-blouse.html.

Please notice this concerns the product page when friendly urls are enabled. If they are disabled, the url will look like /prestest/index.php?controller=product&id_product=2.

Then, if you want to mark this goal as reached only when a certain path is followed, set Funnel to On, name the step and use the same page pattern to add the url that must be seen before the product one. Once ready, simply save the goal.

You might have to wait a few days of data collection before being able to verify this goal. Therefore, if you see it reads 0% conversion rate immediately after creating your account, it’s perfectly normal.

Common page names

Here is a list of pages you might want to track (friendly urls)

  • /order (cart page)
  • /quick-order (one page checkout)
  • /order-confirmation (order placed)
  • /contact-us (contact us page)

Final Checkup

As mentioned before, it’s necessary to wait at least the end of the days to see the main statistics page populated with data. However, if you want to immediately check the successful linking of your store with Google Analytics, you can load your website, then in the main GA panel click Real-Time, Overview. If you see at least 1 user is currently online, it means your site is correctly linked!

You like the tuts and want to say "thank you"? Well, you can always feel free to donate:

  • Karsten Madsen

    Thanks, useful article :)

  • Ekomydlarnia

    Hi, i successfully integrated analytic by presta analytics module (api). But, how to view stats in page ?
    Add aditional js tracking code in header ?

You like the tuts and want to say "thank you"? Well, you can always feel free to donate: