Changing campaign variable name

Hi

Following are the campaign variables:
[ul]
[li] campaign_var_name
[/li][li] campaign_keyword_var_name
[/li][/ul]

I need to change the names of these parameters. I know that it can be done through Piwik’s configuration file.

i.e., Piwik installation will have a subdirectory called ‘config’ and in that subdirectory is a file called ‘config.ini.php’.

I have added the following lines to ‘config.ini.php’:


campaign_var_name = "my_campaign"
campaign_keyword_var_name = "my_kwd"

Now, I have added “www.example123.com” as a site on Piwik. It has siteid as 1.

I am trying to create a campaign url as:


http://www.example123.com/?my_campaign=test-campaign&my_kwd=local-demo

Is it correct ? If yes, then why Piwik is not showing any link ?
Have I don’t something wrong with config.ini.php

No, config.inc.php is not right. You have to change these:

campaign_var_name = piwik_campaign
campaign_keyword_var_name = piwik_kwd

in the “global.inc.php”.

You can add the lines to config.ini.php, but you have to add the section as well, e.g.,


[Tracker]
campaign_var_name = piwik_campaign
campaign_keyword_var_name = piwik_kwd

@Anthon: It worked, Thank you so much.

@macringo: We can configure that using config.inc.php, as shown by Anthon.

Thank You All.

I didnt know that. Thanks :slight_smile:

Ok, so adding
[Tracker]
campaign_var_name = utm_campaign

at the bottom of our config.ini.php will have all our campaigns with links like these:
www.xyz.tld/?inperfe.html?utm_source=bestshoppen&utm_medium=cpc&utm_campaign=best

registered under the campaigns tab? Sweet. Trying now.

Edit: tried it, works like a charm :wink: