New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No setVisitorId in JavaScript tracking API? #12777
Comments
Any news on that ? It seems the method is public... |
@yohannprigent you can't set the visitorId yet but a userId if that helps: https://matomo.org/docs/user-id Not 100% sure why the method isn't public yet but maybe cause we'd then need to update the cookie again etc and there could be some complications if the setVisitorId is called too early when cookies aren't configured yet fully (eg cookie path, domain, ...) or if the idSite is still missing etc but we could kind of control this internally when it will be called. I guess it's just a bit more complicated then having this method public. Would you expect this method to persist the visitorId in a cookie @yohannprigent ? Might be good to let us know a bit more about your use case so we can better understand things. |
My use case is essentially to keep a consistent visitorId between different websites, on different subDomains. Matomo provides a great So yes, it would persist within the cookie in my opinion, as |
Do you know if we have an issue for this already? Are you saying you define eg
Then you want |
@tsteur Totally correct. Different domains tracked into different websites. |
@olleharstedt be good to at least create an issue for it for now 👍 We'd then need to see how we could make this work. I presume we'd want to keep existing behaviour by default and any set domain would be used for both purposes, unless setting some other domains for cross domain specifically. |
Added in #16042 - will be available in 3.13.7 |
Reading the docs, it seems like there's no
setVisitorId
in the JavaScript tracking API. Any reason for this? I have a big problem with a mismatch between the visitor id returned by the PHP API and the one returned by the JavaScript, which makes part of our logic unusable. I was hoping to bridge this mismatch by setting the visitor id = the one I got from the PHP API.The text was updated successfully, but these errors were encountered: