Shopify: install a container (with a tracking code)


Needed permissions: owner

If you’re running an online store on Shopify, it’s easy to track how it’s being used. All you need to do is add your store to Piwik PRO, install the container on Shopify and voila! You’ll have access to Analytics, Tag Manager and Consent Manager right within your Shopify store.

In this article, we’ll provide a step-by-step guide on how to make this happen.

Add a site in Piwik PRO

To add your Shopify store as a site in Piwik PRO, follow these steps:

  1. Go to Menu > Administration.
  2. Navigate to Sites & apps.
  3. Click Add a site or app.
  4. Type the site name and address and click Save.
    Adding Shopify site name and address to Piwik PRO
  5. Set the time zone and currency.
    Editing Shopify time zone and currency in Piwik PRO

    Note: We’ll show data in reports in this time zone. We’ll use this currency for goal revenue.

  6. Navigate to Installation.
  7. In Sites, click Install manually.
  8. Copy the code from Basic container (async).
    Install Piwik PRO

Install the container in Shopify

To install the Piwik PRO container in your Shopify store, follow these steps:

  1. Log in to Shopify.
  2. Go to Online Store > Themes.
  3. In the section with your current Shopify theme, click the three-dot icon.
  4. Click Edit code
    Editing Shopify theme code
  5. The theme code will be opened in Shopify’s Code Editor. 
  6. In Layout, find your theme.liquid file that defines the look and feel of your theme. 
  7. Paste the container code right after the opening <body> tag in the theme’s HTML code.
    Adding the Piwik PRO container code to Shopify theme body tag
  8. Click Save.
  9. To confirm that Piwik PRO is properly installed on your store, click the three-dot icon.
  10. Choose Preview from the list.
    Preview in Shopify
  11. If you see our consent form, the installation was successful.
    Piwik PRO consent form in Shopify

    : We’ll start showing a consent form on your Shopify site after you’ve installed the container. Add your privacy policy address to the form or turn off the consent form.

  12. Well done! Data will appear in reports in about an hour. Data in the tracker debugger will appear instantly.

    Tip: You can also check manually to see if your tracking works. Read more

Tip: To change the way your data is collected, you can use the following settings:

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Back to help center