Open m4xbl4ck opened 7 years ago
Isn't this intended behaviour as described in the README:
The rules are the same with Google Analytics:
- UTM and Organic source always overrides any previous source.
- Typein never overrides a previous source.
- Referral source overrides previous source only if there is no user session at the moment. If it’s inside the same session — a referral source will never override previous source.
Explanation to referral logic: sometimes visitor within the current visit (session) comes to the website from the “source” which is not actually a “source”. For example, it can be visit from the email service, where he had a registration activation link.
If all the sessions you described happened within the session duration (30min by default), then this should be correct. If the sessions you described were outside of 30min, then its a bug.
Title says it all.
Here's two examples,
First session is from an "organic" source, sbjs.get.current.src will return "organic".
Second session is a "typein", sbjs.get.current.src will return "organic".
Third session is from a "referral" source (no matter if it's http or https), sbjs.get.current.src will return "organic".
First session is from a "referral" source, sbjs.get.current.src will return "referral".
Second session is from a "cpc" source, sbjs.get.current.src will return "cpc".
Third session is a "typein", sbjs.get.current.src will return "cpc".
Fourth session is from a new "referral" source, sbjs.get.current.src will return "cpc".
I love the script, it's SUPER useful, I just wish that the 2 issues I just reported were fixed so my data stay accurate :) congrats for the good job!