Skip to main content

I’m using the JavaScript-Amplitude SDK and initializing it with 

 

amplitude.getInstance().init(token, null, { includeReferrer: true, unsetParamsReferrerOnNewSession: true })

But I’m noticing that the expected properties such as referrer and referrering_domain are not being sent with the events.

 

Any help would be great. Let me know if I need to provide anymore information

Seems like I needed to add an additional option of 

 

amplitude.getInstance().init(API_KEY, USER_ID, { includeReferrer: true, saveParamsReferrerOncePerSession: false, });




detailed here: https://github.com/amplitude/Amplitude-JavaScript/issues/541


Glad to hear that you got help through the Github issue @duncant3 ! 

To clarify, by default Referrer params are tracked at the start of a new session which means if the value changes in the middle of the session, that property will not get updated. If you were testing the referrer property, you likely were running into the default behavior and not seeing the values populate. Enabling the option of updatesaveParamsReferrerOncePerSession:false will allow you to see the referrer property update within the same session. 


Reply