Reading the docs, it seems like there's no
Any news on that ? It seems the method is public...
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
enableCrossDomainLinking function, but it's sad this functionality automatically stop tracking Outlinks from domains defined with
setDomains, even if we don't want.
So I was thinking having a way to define a visitorId I would get from the other Matomo cookie on the other website (but on the same cookie domain). This is my use-case today, but I think if Matomo tracker would allow to select if we want outlinks from domainAlias to be tracked, my use case would not need to exist.
So yes, it would persist within the cookie in my opinion, as
Matomo provides a great enableCrossDomainLinking function, but it's sad this functionality automatically stop tracking Outlinks from domains defined with setDomains, even if we don't want.
Do you know if we have an issue for this already? Are you saying you define eg
Then you want
example.bar to be still tracked an outlink? Is this basically because they aren't tracked into the same site in Matomo but different sites?
@tsteur Totally correct. Different domains tracked into different websites.
At my knowledge, we don't have issue for that.
What makes me sad is that we have two different checkboxes on the tracking code configuration : one to hide from outlinks (screenshot), and one for the crossDomain. The crossDomain automatically applies the "hide from outlinks"... This should be a separate option, as it is a separate checkbox here.
I could submit a PR to add an option to track outlinks even if they are to a domain defined within
setDomains. From what I see in the tracker, this should be a light add.
@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.