Set up Cookie Information and Piwik PRO for the first time

Your license includes access to two tools:

  • Piwik PRO Analytics Suite
  • Cookie Information Consent Management Platform (CMP)

Both tools work together: Cookie Information collects user consent, and Piwik PRO collects analytics data based on that consent.

Diagram presenting how your site connects to Piwik PRO Analytics Suite, Cookie Information, and the Cookie Information Integration tag
How your site connects to Piwik PRO Analytics Suite, Cookie Information, and the Cookie Information Integration tag

In this article, we’ll walk you through setting up Cookie Information and Piwik PRO from scratch.

If you’re using the trial onboarding

If you created your account through a Cookie Information trial, you may see an in-app setup wizard.

Follow the steps in the wizard to:

  • choose the popup language
  • copy the script
  • add the script to your website

Once the consent popup is installed, continue with this guide to connect Cookie Information with Piwik PRO.

Before you start

Here are a few important things to know before you start:

  • Piwik PRO collects analytics data and Cookie Information collects user consent on your website. Connecting them ensures you collect data only after consent.
  • When you create your account for the first time, you’ll get a trial account where a few steps might be different than those on your paid account. The trial lasts 30 days.
  • To set up Piwik PRO and Cookie Information for the first time, you’ll need to:
    • Create a consent popup
    • Install Cookie Information on your website
    • Install Piwik PRO
    • Connect both tools
  • You need access to:
    • Your website code
    • Cookie Information
    • Piwik PRO

Set up Cookie Information for the first time

In this section, you’ll set up Cookie Information and install the consent popup on your website.

Set up your domain and install the consent popup

  1. Log in to your Cookie Information account.
  2. In Domain address, enter the domain name where you want to use Cookie Information CMP. You can add more domains later if your setup needs them.
Setting up a domain in Cookie Information onboarding
  1. Select Domain type. Read more
  2. In Default language, choose the language for your popup. You can add more languages later.
select a language for the popup in Cookie Information onboarding
  1. Copy the Cookie Information installation script:
<script id="CookieConsent" 
      src="https://policy.app.cookieinformation.com/uc.js" 
      data-culture="EN" data-gcm-version="2.0" type="text/javascript"></script>

Note:

  • The data-culture value sets the language of the consent popup. This example will be displayed in English. Set the data-culture attribute to a different language code to change the language. Make sure that the languages set in the script’s data-culture attribute match the languages set up in the platform.
  • To avoid problems, don’t change the consent popup script, except for the data-culture attribute.
  • If the data-culture value in the script doesn’t match the language set in Cookie Information, the consent banner may not appear. Make sure these language settings match. If you still have problems, see our troubleshooting guide.

Supported data-culture values

Use the code that matches your language. For example:

  • EN — English
  • DE — German
  • FR — French

See the table below for all supported languages.

Data cultureLanguageData cultureLanguage
ARArabicLTLithuanian
BGBulgarianLVLatvian
CACatalan, ValencianMSMalay
CSCzechNBNorwegian Bokmål
DADanishNNNorwegian Nynorsk
DEGermanNONorwegian
ELModern GreekNLDutch, Flemish
ENEnglishPLPolish
ESSpanish, CastilianPTPortuguese
ETEstonianRORomanian
FIFinnishRURussian
FRFrenchSKSlovak
HEModern HebrewSLSlovene
HIHindiSQAlbanian
HRCroatianSRSerbian
HUHungarianSVSwedish
IDIndonesianTHThai
ISIcelandicTRTurkish
ITItalianTWTaiwanese
JAJapaneseUKUkrainian
KOKoreanVIVietnamese
KLGreenlandicZHChinese
  1. Add the script as high as possible in the <head> section of your website.

Note:

  • If you place them incorrectly, the setup won’t work.
  • If the setup is correct, the consent popup will appear on your site within 10 minutes.

Optional: Use a different installation method. If you prefer a different installation method, follow one of our installation guides.

  1. To confirm the installation, click I’ve added the script.
  2. Your consent popup is now ready.
cookie information_piwik pro consent banner

Note: Make sure Shared consent is turned off in Cookie management > Consent sharing and cookie control.

consent sharing and cookie control settings in Cookie Information
  1. Done. You’ve created your first consent solution and installed your Cookie Information script to display the consent popup.

Tip: If you want to change more settings or customize the banner appearance, see our guides.

Install Piwik PRO

In this section, you’ll install the Piwik PRO container on your website. The container collects data about how people use your site. For other ways to install it, see our installation guides.

Note: To use the default integration between Piwik PRO and Cookie Information, you need a tag manager.

To install Piwik PRO, follow these steps:

  1. Log in to your Piwik PRO account.
  2. Go to Menu > Administration.
  3. In Sites & apps, click Add a site or app.
  4. Enter your site or app name and address.
Adding a site or app in Piwik PRO Administration

Note: You can add multiple domains to one site or app and track them using a single container code. Data from all domains will appear in the same reports.

If you want separate reports for each website, create a separate site or app for each one. Read more about sites and apps in Piwik PRO help center.

  1. In Data collection, set the time zone and currency.
Selecting a time zone in Piwik PRO setup

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

  1. Navigate to Installation.
  2. In Sites, click Install manually.
install Piwik PRO code manually
  1. Click Copy to clipboard.
Copying the Piwik PRO code to install it manually
  1. Paste the code right after the opening <body> tag on every page of your website or app.

Note: Because the tools serve different purposes, install each script in a different location:

  • Cookie Information → <head>
  • Piwik PRO → <body>

Make sure each script is placed in the correct section of your website.

See our Piwik PRO help center for guides on customizing your setup and setting up tags and reports.

  1. Done. The Piwik PRO container is installed on your website.

Connect Piwik PRO with Cookie Information

To connect Piwik PRO with Cookie Information, follow these steps:

  1. In Piwik PRO, go to Administration.
  2. In Sites & apps, pick the site or app you created in step 4 of the Install Piwik PRO section.
  3. Navigate to Privacy.
  4. In Consent, turn on Ask visitors for consent.
Setting up ask visitors for consent in Piwik PRO
  1. In Consent settings, click View.
  2. Turn on Use a custom consent form.
Using a custom consent form in Piwik PRO

Note: If you created your Piwik PRO account through the Piwik PRO website, you can skip the next steps and your integration is ready.

  1. Now you’ll need to set up a Cookie Information tag in Piwik PRO. Go to Menu > Tag Manager.
Tag Manager in Piwik PRO menu
  1. In Tags, click Add a tag.
  2. In Add a tag, choose the tag template: Cookie Information.
Selecting Cookie Information tag in Piwik PRO Tag Manager
  1. Click Next.
  2.  Name your tag, for instance, Cookie Information.
  1. In Consent mapping, map Cookie categories to Consent types.
consent mapping in Piwik PRO Tag Manager
  1. Click Add.

Note:

  • You can use the default mapping by clicking ‘Set defaults’, but you can always change it.
  • You can map multiple consent types to a single cookie category. For example, ‘Statistical’ can be mapped to both ‘Analytics’ and ‘Remarketing’.
  • You can leave cookie categories and consent types unmapped. However, it’s a good practice to map all of them, just in case you decide to use them in the future.
  • If you use an unmapped consent type in a tag, it won’t fire.
  • ‘Necessary cookies’ are mapped to ‘No consent is required’ without the ability to change them.
  • The Piwik PRO tag, responsible for collecting visitor data, requires ‘Analytics’ consent by default. So, if you want to collect such data, you need to map it to the right cookie type. Keep in mind that, by default, this tag will fire and collect anonymous data from visitors who haven’t consented. However, you can always turn off anonymous data collection. You can also change the default ‘Analytics’ consent set for the Piwik PRO tag.
  • Each time you change the mapping of cookie categories to consent types, you need to click Reset consent in Cookie Information > Settings > Ask for consent again.
  • This option will reset consent for all domains in this consent solution. The consent popup will be shown again to all visitors. Use this only if you’ve made changes that require new consent from returning users, like updates to cookie purposes, legal basis, or vendors. This is a one-time action.
  1. In Consent type, make sure the type is set to: No consent is required.

Note: The Cookie Information tag you’ll set up in Piwik PRO doesn’t require consent. This tag is set this way because it only maps consents. We need it to fire for all visitors so that consent information flows between Cookie Information and Piwik PRO.

  1. In Advanced tag settings, turn off Respect opt-out and DNT. This tag should fire for every visitor since it only maps their consents.
advanced tag settings in Piwik PRO Tag Manager
  1. In Tag triggers, select Choose existing trigger.
  2. Select the following trigger: All page views.
Selecting a tag trigger in Piwik PRO Tag Manager
  1. Click OK to save the trigger.
  2. Click Add to add the tag.
  3. Test your tag in debug mode.
  4. When the tag works correctly, click Publish.
  5. All set! Your Piwik PRO and Cookie Information setup is ready.

Related articles

Was this article helpful?