If you want to track online campaigns you need to tag links with special parameters. You can do it manually or use our Piwik PRO URL builder. In this article, we’ll explain how.
You can use default parameters that are related to specific dimensions. These parameters will save your campaign data under that dimension. Our Piwik PRO URL builder uses pk_* parameters.
|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.
- Parameter values are case sensitive. The campaign name
winter_promois different from
- The parameter value can be up to 1024 characters.
- You can customize the default parameters. Read more
- For best results, you should tag your campaigns with great detail.
You can add parameters manually or you can use the Piwik PRO URL builder. Let’s look at an example.
If you’re running a winter campaign on Facebook using a sponsored post, you can set the following parameters:
- pk_campaign: winter_promo
- pk_source: Facebook
- pk_medium: sponsored_post
Your campaign URL will look like this:
If someone enters your site from this link, Piwik PRO will recognize these parameters and save your campaign data under the following dimensions:
- Campaign: winter_promo
- Source: Facebook
- Medium: sponsored_post
After setting up your campaigns, you can view data related to the ads in the campaign report.
To see the campaign report, follow these steps:
- Go to Menu > Analytics.
- Navigate to Reports.
- On the left, click Campaigns.