includeReferrer not working/not being sent with events

  • 20 October 2022
  • 2 replies

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


Best answer by belinda.chiu 20 October 2022, 22:38

View original

2 replies

Seems like I needed to add an additional option of 


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

detailed here:

Userlevel 6
Badge +8

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.