Actually I’m using a custom variable to track these campaigns but I would like to use the native campaign support already present in Piwik.
I found I can manually call piwik.php and set the campaign name using the _rcn parameter, but, I’m using the Javascript API and I can’t find a way to set the campaign name, so…
How can I set the campaign name using the Javascript API? I think it’s not possible. In that case, please take it as a feature request.
Thanks for answering, but I can’t imagine how to use those functions to solve my problem because campaign name is part of the subdomain, it isn’t in the query string.
I can read subdomain (==campaign name) using Javascript, and i was expecting it existed a function ‘setCampaignName’ (instead of setCampaignNameKey).
Actually what I’m doing is, using Javascript, to extract subdomain, append “#pk_campaign=subdomain” to the url, and finally use setCustomUrl(). I don’t like it because I’m modifying the url reported to Piwik.