Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

setCustomVar does not work with 2.15.0rc3 #9044

Closed
cbleek opened this issue Oct 17, 2015 · 1 comment
Closed

setCustomVar does not work with 2.15.0rc3 #9044

cbleek opened this issue Oct 17, 2015 · 1 comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@cbleek
Copy link

cbleek commented Oct 17, 2015

I use "setCustomVariable" in my Piwik code as follow and I noticed, that the values are not tracked as expected.

  _paq.push(["setCustomVariable", 1, "Domain", document.domain, "visit"]);
  _paq.push(['trackPageView']);

after debugging, I've seen, that $keyValue contains a string like '["NAME", "VALUE"]' where propably an array is expected.

https://github.com/piwik/piwik/blob/master/core/Tracker/Request.php#L553

I could help myself by convert this string to back to an array.

           foreach(preg_split("/[\s,]+/", $keyValue) as $val){ 
              $keyValueModified[]=trim($val,'"[]');
            }  
               
            $keyValue=$keyValueModified;

Can somebody please take a look at this?

Regards,

Carsten

@cbleek
Copy link
Author

cbleek commented Oct 18, 2015

duplicates #9027

@cbleek cbleek closed this as completed Oct 18, 2015
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Oct 22, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants