If your website is built with Drupal, you can easily add our container with a tracking code by installing the Piwik PRO module, and start collecting visitor data right away.
In this article, we’ll walk you through the process step-by-step.
Add a site in Piwik PRO
To add a site in Piwik PRO, follow these steps:
- Go to Menu > Administration.
- Navigate to Sites & apps.
- Click Add a site or app.
- Type the site name and site address and click Save.
Note: If you want to collect data from a few domains with the same tracking code, add their addresses.
- Set the time zone and currency.
Note: We’ll show data in reports in this time zone. We’ll use this currency for goal revenue.
Install Piwik PRO module in Drupal
To install the Piwik PRO module in Drupal, follow these steps:
- Log in to Drupal.
- Install the following module as you would normally do: https://www.drupal.org/project/piwik_pro.
- Navigate to Administration > Extend and enable the module.
- Navigate to Administration > Configuration > Webservices > Piwik Pro.
- Type in the container address (URL).
Note: Enter your Piwik PRO account address with containers added to the address.
For standard domains:https://yourname.containers.piwik.pro
For custom domains:https://yourname.piwik.pro/containers
This address may be different for Piwik PRO private cloud accounts. Contact us to get the right address. - Type in your site ID. Where to find it?
- (Optional) Rename the data layer.
Note: Rename the data layer if you use other software with data layers. If the names are the same, the software can interfere with each other.
To check if your data layer name is not used by other software on your site, follow these steps:- In the console on your site, run this command:
!window.hasOwnProperty("customDataLayer");
replacing customDataLayer with your custom name. - If this command returns true, then you can safely use your custom name.
- In the console on your site, run this command:
- In Add tracking to specific pages, select one of the following options and specify the pages:
- Every page expect the listed pages
- The listed pages only
Note: Specify pages by using their paths. Enter one path per line. The ‘*’ character is a wildcard. Example paths are
/blog
for the blog page and/blog/*
for every personal blog.<font>
is the front page. - Click Save configuration.
- All 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
- We’ll start showing a consent form on your site after you’ve installed the container. Add your privacy policy address to the form or turn off the consent form.
Tip: To change the way your data is collected, you can use the following settings: