Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mattab opened this Issue · 5 comments

1 participant

@mattab
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
Owner

see also #1198

@mattab
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
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
Owner

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

@mattab
Owner
@mattab mattab added this to the Piwik 1.3 milestone
@mattab mattab self-assigned this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.