You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "_pk_id" cookie is set by the setSiteId() method before the setVisitorCookieTimeout() and setCookieNamePrefix() are executed. As a result it is not possible to change the prefix and lifetime for that cookie. The other cookies change with the the prefix and you will get a second id cookie sometimes.
Tracking Code example:
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['setCookieNamePrefix', 'stats']);
_paq.push(['setVisitorCookieTimeout', '0']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo-dev/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
Call Stack:
The text was updated successfully, but these errors were encountered:
tsteur
added
the
Bug
For errors / faults / flaws / inconsistencies etc.
label
Oct 9, 2019
I can see how this is an issue.
For now fixed it for setVisitorCookieTimeout in #14980
With setCookieNamePrefix I'm not 100% sure if we can also fix it that way and don't have the time right now unfortunately. It's not only setting a name prefix but also fetching the customVariables and not sure if the custom variables can cause side effects and whether they are always loaded again.
The "_pk_id" cookie is set by the
setSiteId()
method before thesetVisitorCookieTimeout()
andsetCookieNamePrefix()
are executed. As a result it is not possible to change the prefix and lifetime for that cookie. The other cookies change with the the prefix and you will get a second id cookie sometimes.Tracking Code example:
Call Stack:
The text was updated successfully, but these errors were encountered: