How can I customize Piwik PRO campaign parameters?

Piwik PRO recognizes its own pk_* parameters and Google utm_* parameters.

There are six Piwik PRO’s parameters you can add to your URLs:

  • pk_campaign: the name for a campaign. For example, Winter_Promo. 
  • pk_source: helps you identify the advertiser, website, publication, and more. For example, Newsletter, Facebook, Google.
  • pk_medium: describes the medium used for advertising. For example, CPC, banner, sponsored_post.
  • pk_keyword: helps you identify paid search keywords. For example, free_bank_account.
  • pk_content: used to 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.
  • pk_cid: helps you differentiate campaigns using an ID number. For example, if you are using two similar creatives for Facebook, and want to see which one performs better, you can tag them with a different pk_cid parameter.

Customize campaign parameters

You can also use custom parameters in your campaigns. For example, if you want to use a different campaign name than pk_campaign, you can add the new parameter name in settings. Here’s how to do it.

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!

Back to help center