Changing campaign variable name


(Jatin Mehta) #1

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


#2

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”.


(vipsoft) #3

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


(Jatin Mehta) #4

@Anthon: It worked, Thank you so much.

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

Thank You All.


#5

I didnt know that. Thanks :slight_smile:


#6

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: