Piwik PRO recognizes its own pk_*
parameters, Google utm_*
parameters, and some other default parameters. These parameters are related to specific dimensions and save your campaign data under that dimension.
If you need to use different parameters than the default ones, you can easily set them up. In this article, we’ll show you how.
Default campaign parameters
Here’s a list of default campaign parameters in Piwik PRO:
Dimension | Default parameters | Required/Optional | Description |
---|---|---|---|
Campaign name | pk_campaign, piwik_campaign, pk_cpn, utm_campaign | Required | The name of your campaign. Example: winter_promo. |
Source | pk_source, utm_source | Optional | It helps you identify the platform on which you run your campaign, such as a newsletter, social media site or other site. Example: Newsletter, Facebook, Google. |
Medium | pk_medium, utm_medium | Optional | It helps you identify the method or format of your campaign, such as a banner ad, sponsored post, or click-per-click (CPC) ad. Example: banner, sponsored_post, CPC |
Keyword | pk_keyword, piwik_kwd, pk_kwd, utm_term | Optional | Words or phrases used in paid search campaigns. Example: free_bank_account. |
Campaign content | pk_content, utm_content | Optional | It helps you separate similar content within the same ad. For example, if you have a newsletter with two call-to-action buttons, you can tag each link for each button with a different pk_content parameter and see which version is working better. |
Campaign ID | pk_cid, utm_id | Optional |
It lets you assign a unique ID to your campaing. For example, if you use two similar creatives on Facebook and want to see which one performs better, you can tag them with different pk_cid parameters. Note: The gclid is passed through this parameter. |
Note:
- Parameter values are case sensitive. The campaign name
winter_promo
is different fromWinter_Promo
. - The parameter value can be up to 1024 characters.
Customize campaign parameters
You can add new campaign parameters for a site/app or for the whole account.
For a site or app
Avaliable from version 16.0.0. For versions below 16.0.0, see this section.
To add a custom campaign parameter to a site or app, follow these steps:
- Go to Menu > Administration.
- Navigate to Sites & apps.
- On the left, pick the site or app you want to set up.
- Navigate to Data collection > Campaigns.
- Add a new parameter to the list.
For the whole account
Avaliable from version 16.0.0. For versions below 16.0.0, see this section.
To add a custom campaign parameter and use it in the whole account, follow these steps:
- Go to Menu > Administration.
- Navigate to Settings.
- On the left, click Global site & app settings.
- Navigate to Data collection > Campaigns.
- Add a new parameter to the list.
Manual setup
To add a custom campaign parameter manually, follow these steps:
- In your tracking code, above the
trackPageView() call
, add the following code:_paq.push(['setCampaignNameKey', 'new name']); _paq.push(['setCampaignKeywordKey', 'new name']);