@mattab opened this Issue on July 7th 2009 Owner

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.

@mattab commented on April 2nd 2010 Owner

see also #1198

@mattab commented on June 23rd 2010 Owner

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

@mattab commented on March 4th 2011 Owner

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.

@mattab commented on April 11th 2011 Owner

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

@mattab commented on April 27th 2011 Owner
This Issue was closed on April 27th 2011
Powered by GitHub Issue Mirror