Now that you know why and how you are collecting data, it’s time to turn on Piwik PRO, install a container with the tracking code, and set up a few things. Let’s get started.
Install a container (with a tracking code)
Piwik PRO uses a container to let you manage tags and consents, and run a tracking code (a JavaScript code) on your web pages. The tracking code collects data about people who visit your site or app. Every time a visitor views a page, the tracking code grabs information about that visitor and sends it to Piwik PRO. Then Piwik PRO organizes this data into reports.
To install a container, follow these steps:
- Go to Menu > Administration.
- Navigate to Sites & apps.
- Click Add a site or app.
- Type the site or app name and address.
Note: If you want to track 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.
- Navigate to Installation.
- In Sites, click Install manually.
- In Basic container (async), click Copy to clipboard.
Note: This container holds your tracking code and is used to handle most tags.
- Paste the code right after the opening <body> tag on every page of your website or app.
- Data will appear in reports in about an hour. Data in the tracker debugger will appear instantly.
Tip: You can also check manually if the tracking works. Read more
- We’ll start showing a consent form on your site after installing the container. Add your privacy policy address to the form or turn off the consent form.
Note: You can also add another container: Additional container (sync). Add it if you want to use sync tags. It loads tags before the page content loads.
Tip: You can use other methods to install a container:
Look into settings
After installing a container, you can look into site or app settings. This is where you can set up what data you want to collect and how to display it in reports. Let’s see what we’ll find there.
To change site or app settings, follow these steps:
Available from version 16.0.0. For versions below 16.0.0, see this article.
- Go to Menu > Administration.
- Navigate to Sites & apps.
- On the left, pick a site or app you want to set up.
- Navigate to Data collection.
In Data collection, you can change the following settings:
Basic info
- Site or app address: Your site or app address. If you’re collecting data from a few domains with the same tracking code, add all addresses here.
- Time zone: We’ll show data in reports in this time zone.
- Currency: We’ll use this currency for goal revenue.
Page scrolling
Available from 16.17.0
Measure scroll depth: If turned on, you’ll monitor how far visitors are scrolling on your pages. Scroll data is sent as custom events. For reporting, you’ll need to set up a custom report. Note: If you’re tracking page scrolls with your own custom events, we recommend removing them, otherwise scroll events will be tracked twice.
Internal search engine
- Keywords from your internal search engine: To collect search data, add parameters used by your search engine. You’ll see keywords and categories under Analytics > Reports > Internal search. Note: Some internal search engines don’t use parameters. In such cases, we can’t collect search data.
- Remove keyword parameters from page URLs: When turned on, we’ll collect keyword data from your internal search engine, and then remove parameters from links.
Page URLs
- Remove parameters from page URLs: Without parameters, you’ll see cleaner page URLs in reports. But if parameters hold some important information like keyword, referrer, campaign name, you’d better keep them. Note: The added parameters are case-sensitive.
- Keep anchors in page URLs: When turned on, you’ll see page URLs with anchors in reports. This can help you analyze how visitors use anchor links on your site. Tip: Anchors help users get to a specific point on the page without scrolling. Example: #details is an anchor in this link example.com/pricing#details
Campaigns
- Campaign parameters: You can collect campaign data based on listed parameters. Here you can change those parameters.
- Start a new session when the campaign changes: When a campaign changes during the session, we’ll begin a new session for this visitor. This will help you collect data for all campaigns: the first one and the changed ones.
Filters
- Don’t collect data from these IP addresses: You can stop collecting data from added IP addresses. Use wildcards like 1.2.3.* or 1.2.*.* to deny traffic from a group of IP addresses
- Don’t collect data from known crawlers: If turned on, we won’t collect data from known crawlers. We don’t collect any data from bots by default.
- Add crawlers: We’ll block added crawlers along with known crawlers. Use a user agent name or full user agent string to define crawlers.
- Collect data only from known sites: If turned on, you’ll collect data only from sites with web addresses added under Site or app address. This can protect your data from spam coming from unknown web addresses.
SPA
Available from 16.19.0
Track page views in a single-page application: If turned on, we’ll record each browser history state change on a page and report it as a page view in reports. Note: If you notice that a page view is recorded twice on a page load, turn on this setting: Tag Manager > Piwik PRO tag (tracking code) > Other options > Track page views manually. Tip: For more advanced setups, we recommend using our tracking libraries.
Other options
- Delay loading the next page: This tiny delay happens when a visitor clicks on a button or submits a form. It gives tags time to fire on the next page.
- Start a new session when the referrer changes: If turned on, when a referrer changes during the session, we’ll begin a new session for this visitor. This will help you collect data for all referrers: the first one and the changed ones.
- Navigate to Privacy.
In Privacy, you can change the following settings:
Consent
- Ask visitors for consent (on): If turned on, you’ll display a consent form on your site. You can also set up the following elements:
- When visitors don’t consent:
- Collect data using a 30-minute cookie: You’ll use a 30-minute cookie to collect session data. You won’t recognize new and returning visitors. You’ll see data about visitor’s country. Visitors’ IP addresses will be fully masked.
- Collect data without using cookies: You won’t create or store any cookies on visitors’ browsers. Nothing will be stored on visitors` devices. You won’t recognize new and returning visitors. You’ll see data about visitor’s country. Visitors’ IP addresses will be fully masked.
- Don’t collect data: The tracking code won’t be fired for visitors.
- Ask for consent in countries under the GDPR and UK GDPR: If turned on, we’ll show the form only to visitors from countries under the GDPR and UK GDPR. We’ll use visitors’ IP addresses to recognize countries.
- Consent is valid for: The cookie storing consent preferences will expire after this time, and your form will ask a visitor for consent again.
- Share consent between subdomains: You can add subdomains to share consent between them. Enter a full URL or use a wildcard like *.example.com.
- Use a custom consent form: This consent form overrides those from Consent Manager. You can add it via the JavaScript API. Read more
- When visitors don’t consent:
- Ask visitors for consent (off): If turned off, you’ll collect data without consent. For this setting, you can turn two options on or off: a session ID and visitor cookies. If you turn both off, each event will be treated as a new session and you won’t recognize visitors.
- Use a session ID: If turned off, you won’t use a session ID that recognizes a session based on a visitor’s device or browser settings. Each session has a unique session ID, which can only identify individual sessions and never identifies visitors.
- Use visitor cookies: If turned off, you won’t set visitor cookies like
_pk_id.*
and_pk_ses.*
that are responsible for recognizing visitors and their sessions.
- Comply with CNIL guidelines: If turned on, we’ll hide the session log report (Analytics > Reports > Session log) and the tracker debugger (Analytics > Settings > Tracker debugger). We’ll also show a warning message when a user tries to create API keys. Read more
IP addresses
- Mask IP addresses: If turned on, we’ll remove the selected number of bytes from the address before saving it to the database. Nobody will ever see the full address. IP masking helps keep visitor data private.
- Collect from unmasked IP addresses (All location data, City, Region, or Continent): We’ll take this data from unmasked IP addresses before we mask them. You’ll always see masked IP addresses in reports.
- Ask visitors for consent (on): If turned on, you’ll display a consent form on your site. You can also set up the following elements:
- Navigate to Reports.
In Reports, you can change the following settings:
- Show ecommerce reports: If turned on, you’ll see these reports under Analytics > Ecommerce. Before you collect any ecommerce data, you need to set up tracking. Read more
- Show SharePoint reports: If turned on, you’ll see these reports under Analytics > SharePoint. Before you collect any SharePoint data, you need to set up the integration. Read more
Tip: To change how your data is collected, you can also use the following settings:
Invite a user
If you want to use Piwik PRO in a team, you need to invite your teammates and set permissions for sites and apps, meta sites and apps, and modules. Let’s see how this can be done.
To invite a user, follow these steps:
- Go to Menu > Administration.
- Navigate to Users.
- Click Invite a user.
- Enter your teammates’s email address and click Send invitation.
Note: Invitations are sent in version 16.0.0 and higher. In versions below 16.0.0, you need to set a password for your teammate and ask them to reset that password during the first log-in.
- Your teammate will receive an email with an activation link. They can then click on the link and set their password.
- After sending an invitation, set permissions for your teammate. By default, new users don’t have access to any site, app or meta site or app.
- Go to Menu > Administration > Sites & apps > Permissions to grant permissions for a site or app.
Here’s a brief overview of all permissions:
- Manage: The user can view and edit websites, view, edit, and publish tags, import and export audiences, manage permissions, and use Consent Manager. But they can’t add a website or a new user.
- Edit & publish: The user can do the same actions as on the manage level, except they can’t manage permissions.
- Edit: The user can view and edit websites, view and edit tags, import and export audiences and change general options. But they can’t publish a tag, manage permissions, and use Consent Manager.
- View: The user can view websites, tags, and export audiences.
- No access: The user doesn’t have access to anything.
Tip: Read more about permissions for a site or app.
- Go to Menu > Administration > Meta sites & apps > Permissions to grant permissions for a meta site or app.
Tip: Read more about permissions for meta sites and apps.
- Optionally, go to Menu > Administration > Users > Profile to change access to modules.
- Optionally, turn on Owner access to give your teammate the owner role. They then will have unlimited access to everything.
Tip: The difference between the owner and user is:
- Owner is the primary contact for the account and can perform all actions in the account, including adding a site or app, inviting other users to join and granting permissions for a site or app.
- User can do only specific actions, depending on the type of permission they have for each site or app. By default new users don’t have access to site, app or meta site or app.
Note: If you want to track changes made by your teammates in the platform, use the audit log.