Skip to content
New issue

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

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

Already on GitHub? Sign in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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