rudderlabs / rudder-sdk-js

JavaScript SDK for RudderStack - the Customer Data Platform for Developers.
https://www.rudderstack.com
Other
144 stars 84 forks source link

Initial referrer tracking #209

Closed sourcecoast closed 3 years ago

sourcecoast commented 3 years ago

Problem: Knowing the initial referrer for a user is critical for most analytics tools. We're using MixPanel, which automatically tracks:

Then, with each event, the initial referrer values are sent as well so they are tied to the event for easy reporting. After implementing Rudderstack, we lost the 'Initial Referrer' values with each event.

Workaround We are storing a cookie manually for "Initial Referrer" and then adding that as a property to each RS event call. This works, but would be better if it was done automatically as many analytics tools could use initial referrer.

Fix The Rudderstack Javascript library should automatically store the 'initial referrer' and 'initial referrer domain' for a user and send those values with all future events.

Initial Referrer Domain could be created through a transformation later, but I think it's better to parse it the first time seen instead of for every event.

sayan-mitra commented 3 years ago

Great suggestion. the sdk change is currently in our staging #213 . It will be available in global distribution in few days. We will also pick up the transformer related changes.

sayan-mitra commented 3 years ago

we have also added thr the support in transformations for Mixpanel and Amplitude (cloud mode). please let us know if this helped.

saikumarrs commented 3 years ago

The feature has been merged. Hence, closing the issue.