Conversions for Custom Vars Aren't Updating (Conversion Rate by Browser Version)


#1

I checked the database and have confirmed that custom vars are not being set in the log_conversion table but are being set in log_visit.

I’m using the PHP API instead of Javascript if that helps narrow things down at all… I haven’t dug into the core code much at all, so I’m not sure really how the log_conversion custom vars are being added/updated.

I have tried using both visit and page scoped vars as well…

My code goes something like this:


$piwikTracker->setCustomVariable($id = 1, $name = "Browser Version", $value = $this->agent->browser().' '.$this->agent->version(), $scope = 'page');
$piwikTracker->doTrackPageView('Results');

I’m also doing this on the homepage, to set a visit variable, I just added the page scoped one to see if that helped, but no luck.


$piwikTracker->setCustomVariable($id = 1, $name = "Browser Version", $value = $this->agent->browser().' '.$this->agent->version(), $scope = 'visit');
$piwikTracker->doTrackPageView('Home');

Do I need to do doTrackGoal instead? I setup some ecommerce goals that trigger on pageview titles, and that does indeed trigger a goal, but for some reason it’s not triggering it as a conversion. :frowning:

What I really need is a way to track Browser Version goal conversion rates, maybe there’s a better way to do this than using a custom var?

There is a ticket for this by someone else here: Custom Variable Reports finding no data · Issue #2354 · matomo-org/matomo · GitHub

Anyone have any advice or ideas?

Thanks!


#2

Anyone? :frowning:


(Matthieu Aubry) #3

Thanks for the report, for reference see Custom variables not always set in the conversion when using tracking API · Issue #2564 · matomo-org/matomo · GitHub


#4

Yep I filed a bug ticket as well to make sure someone found this. :slight_smile:


#5

Same issue for me, trying to track goals via php and no custom vars are saved :frowning: