The pk_ Parameters

BACKGROUND: While exploring the benefits and implementation of campaign tracking I stumbled across five different tracking parameters including

pk_campaign
pk_kwd
pk_source
pk_medium
pk_content

I also discovered that there is a limit (two) on the number of tracking parameters that one can send to the Matomo server with a single single HTTP request.

Further in all of the examples that I found only two of the five possible parameters were ever used – namely, pk_campaign and pk_kwd.

QUESTION ONE: How does one know which two parameters to use, and if the pk_campaign and pk_kwd are recommended, in what situation are any of the other three parameters used?

QUESTION TWO: In which data table are the pk_ parameters stored?

Roddy

Hi,

i have no experience with campaign tracking, but I don’t think there is any limit.

Even the URL-builder creates URLs using all parameters:

Yeah! It does not make sense does it. But, read what follows:

Matomo (Piwik) lets you define up to two parameters in your page URLs.

This was taken from https://matomo.org/docs/tracking-campaigns/#tracking-campaigns-using-url-parameters

Roddy

I just installed the Marketing Campaigns Reporting plug-in, after which references to all five parameters appeared in the …/index.php?module=CoreHome under /Referrers/Campaigns.

Because the installation of this plug-in also required that Matomo be rebooted, I then checked the data tables, and sure enough, was able to answer my own question. A new set of field attributes appeared in the log_visit table with the prescript campaign_.

campaign_name
campaign_keyword
campaign_medium
campaign_source
campaign_content

An additional field entry was also discovered

campaign_id

TENTATIVE CONCLUSION: Do not use more than two attributes unless the plug-in is installed.

Hi @Kiusau

Indeed the docs were incorrect and have now been corrected.

There is no limit on using only two parameters at the same time.

Hooray! Hooray! Hooray!

Roddy

1 Like