Solved

Getting referrer data on code, and send it via event properties typescript

  • 22 August 2022
  • 1 reply
  • 305 views

Hi I’m currently on a project with typescript and amplitude data collecting is working well. Though I have a question, my project is getting user properties including referrer domain and referrer, however I’m wondering if there is a way to get the data on my code and maybe group them? For example, if the users are coming from Google, the referrer domain is “https://google.com”, and I wish I could change it to just “google” and send this to user properties or event properties even. I browsed through tons of documentations but couldn’t find the right answer. I hope someone can help me. Thanks a lot! 

icon

Best answer by Zhenia Semenina 5 September 2022, 13:59

View original

1 reply

Userlevel 4
Badge +7

Hey there, to work with user properties we usually suggest Identify API . Not sure if this fits your use case though since I can see that our TypeScript SDK automatically collects referrer but maybe you could trigger an API call to overwrite those values by making an API call to Identify so instead of default values you truncate them and send the updated value.

Reply