Campaign name and keyword variable names should be defined in a list, and should include utm_* by default. #855

mattab opened this Issue Jul 7, 2009 · 5 comments


None yet

1 participant

Piwik Analytics member

Currently you can customize campaign parameters by editing config/config.ini.php and adding the following:

; variable name to track any campaign, for example CPC campaign
; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC' then it will be counted as a campaign referer named 'Adwords-CPC'
campaign_var_name           = piwik_campaign

; variable name to track any campaign keyword
; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC&piwik_kwd=My killer keyword' then it will be counted as a campaign referer named 'Adwords-CPC' with the keyword 'My killer keyword'
campaign_keyword_var_name   = piwik_kwd

New proposal:

  • each variable can be an array, so we can define multiple variable names
  • because GA defines 4 variable for campaign tracking (see URL builder), we would have to define Piwik campaign name, and keyword, by a concatenation of these. For example:
# Campaign Name
campaign_var_name[] = piwik_campaign
campaign_var_name[] = "{$utm_campaign} {$utm_source} {$utm_medium}"

# Keyword
campaign_keyword_var_name[] = piwik_kwd
campaign_keyword_var_name[] = utm_term

Note: as a more complex alternative, we can also contemplate adding a level in the campaign table, to handle 3 or 4 levels (for example, reusing the existing data table used for page views, that has infinite number of levels.

Piwik Analytics member

see also #1198

Piwik Analytics member

When campaign variables are tracked, they should be removed from the URL being recorded in Piwik so that real pages aggregate in the reports.

Piwik Analytics member

What should happen when we see both a campaign parameter in the URL as well as a Website in the referer?

Technically we could credit the visit to both, but count conversions only for the campaign (to avoid overcounting). We should see how other tools handle this (haven't looked yet).

This might need a new ticket for later improvements as tracking both Referers name & campaign details will require schema update, which is also required to support all GA campaign parameters.

Piwik Analytics member

(In [4389]) Fixes #855 Now detecting google style campaign parameters (utm_campaign, utm_term)

Piwik Analytics member
@mattab mattab added this to the Piwik 1.3 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment