@tsteur opened this Pull Request on June 4th 2020 Member

Noticed this when testing on our site with cookies disabled. Basically in this case there is no visitorId unless a user sets it manually.

getCrossDomainVisitorId() was then only returning the device ID but not the visitorId and thus the generated link was invalid.

Tried to add a test like

        tracker.setVisitorId(null); // also tried empty string etc

        replacedUrl = makeReplaceHrefForCrossDomainLink('http://www.example.com/');
        strictEqual(null, replacedUrl, 'replaceHrefForCrossDomainLink, should not return a link when visitorId not set');

but wasn't possible because the site had a cookie already set and Matomo would then always use that cookie overwriting any custom set value when the value is empty

Shouldn't be needed the test anyway.

@tsteur commented on June 4th 2020 Member

build js

This Pull Request was closed on June 4th 2020
Powered by GitHub Issue Mirror