@MichaelHeerklotz opened this Pull Request on October 17th 2018 Contributor

this pr adds the function getGlobalVisitorId() to the tracker js, which returns the visitorId stored in the 3rd party cookie (_pk_uid)

@MichaelHeerklotz commented on October 17th 2018 Contributor

Note: this function will only work correctly, when the Matomo third party cookie is bound to the same domain, for example:
www.example.com -> Content
matomo.example.com -> Matomo
cookie domain: example.com

This could be improved by adding an API call which returns the value (visitorId) of the third party cookie. But I am unsure whether this is a good idea or not. If you are interested, I can adjust my pr.

@MichaelHeerklotz commented on October 18th 2018 Contributor

If this gets accepted, I can add getGlobalVisitorId() also to matomo-php-tracker, if you are intersted.

Powered by GitHub Issue Mirror