@Lijiaqi1992 opened this Issue on May 21st 2020

I use this code to set my web,
like
_paq.push(['setCustomVariable','3','u3','3']);.
But it not always effective.
This is my Mysql data
image
And it also not in table:matomo_log_link_visit_action
Why? Please me where is the problem?

@Findus23 commented on May 21st 2020 Member

Hi,

Did you check if the data is included in the request to matomo.php? Also make sure the variable is set before the page view is tracked.

@Lijiaqi1992 commented on May 22nd 2020

Hi,

Did you check if the data is included in the request to matomo.php? Also make sure the variable is set before the page view is tracked.

Yes,Thanks!
I changed the code _paq.push(['trackPageView']); under the code _paq.push(['setCustomVariable',1,'mykey','myval']); . It work now!
How can I avoid such things happening again?

@tsteur commented on May 22nd 2020 Member

Glad it works now @Lijiaqi1992

The only way to avoid such things is testing any tracking changes work as expected unfortunately. So whenever you're wanting to set new custom variables make sure to test them and check that you're afterwards getting the data in the reports as expected.

This Issue was closed on May 22nd 2020
Powered by GitHub Issue Mirror