Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2329 closed Bug (fixed)

piwik.js: allow customize Campaign tracking parameter names

Reported by: lcb Owned by:
Priority: low Milestone: 1.4 - Piwik 1.4
Component: Core Keywords:
Cc: Sensitive: no

Description

The piwik.js uses Hardcoded variables for campaignNameParameters and campaignKeywordParameters. See js/piwik.js line 1340, 1341.

It must use the values from from the config file. Or is there any posibility to set these variables?

Change History (7)

comment:1 Changed 3 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4504]) refs #1042, fixes #2329 - added setCampaignNameKey() and setCampaignKeywordKey() methods to tracking API; going to update the online docs now

comment:2 Changed 3 years ago by mgoeben

Does this mean that the variables must be set twice in PHP and JS. This sounds not very convenient and could cause errors. I think there should be something that synchronizes both settings.

comment:3 Changed 3 years ago by vipsoft (robocoder)

There's no way to "sync" the config after the tracking code has been pasted to a web page / template.

But there are tickets for a tracking code wizard and campaign url builder. Those should take into account the server configuration, and present the appropriate output.

comment:4 Changed 3 years ago by vipsoft (robocoder)

  • Milestone changed from 1.x - Piwik 1.x to 1.4 - Piwik 1.4

comment:5 Changed 3 years ago by matt (mattab)

I think a simple FAQ would be enough to clarify this. But it's definitely not recommended to customize the parameter name.

comment:6 Changed 3 years ago by matt (mattab)

  • Priority changed from critical to low
  • Summary changed from piwik.js didn't use config values for Campaign tracking. to piwik.js: allow customize Campaign tracking parameter names
Note: See TracTickets for help on using tickets.