@tsteur opened this Pull Request on July 3rd 2020 Member

fix https://github.com/matomo-org/matomo/issues/13246

this PR is based on https://github.com/matomo-org/matomo/pull/16113/files and should be reviewed and merged soon. The change is this PR is a lot smaller.

This applies when someone calls requireConsent. In the past we would have still set a visitor cookie even though if no further call to eg setConsentGiven or rememberConsentGiven followed.

In the past, the visitorId cookie was set when calling setSiteId. I'm not sure why this was the case but it shouldn't be needed to set it so early in the configuration process of a new tracker. In fact we're setting the session and attribution cookie already only when calling getRequest('...') (eg getRequest('action_name=foo')) so it should be fine to set the visitor cookie also only once getRequest is being called which this PR now does.

It does change the nowTs which is stored in the visitor cookie but that shouldn't really change anything cause mostly a tracking request follows directly anyway. And if in past there were cookies disabled etc then we wouldn't have been able to set this anyway.

It's adding a new tracker method areCookiesEnabled but not adding it to the changelog as it doesn't actually do anything and you can't really use it with _paq.push but will document it once merged.

@tsteur commented on July 3rd 2020 Member

build js

@tsteur commented on July 3rd 2020 Member

build js

This Pull Request was closed on July 5th 2020
Powered by GitHub Issue Mirror