How can I customize Piwik PRO campaign parameters?

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 from Winter_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:

  1. Go to Menu > Administration.
  2. Navigate to Sites & apps.
  3. On the left, pick the site or app you want to set up.
  4. Navigate to Data collection > Campaigns.
  5. 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:

  1. Go to Menu > Administration.
  2. Navigate to Settings.
  3. On the left, click Global site & app settings.
  4. Navigate to Data collection > Campaigns.
  5. Add a new parameter to the list.

Manual setup

To add a custom campaign parameter manually, follow these steps:

  1. In your tracking code, above the trackPageView() call, add the following code:
    _paq.push(['setCampaignNameKey', 'new name']);
    _paq.push(['setCampaignKeywordKey', 'new name']);

Was this article helpful?

Technical support

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

Related articles

Back to help center