Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
How can i track user referrals with reactJS?

I have a reactJS web application, i would like my users to be able to refer other users to the application.

I have used URLSearchParams in the signup form so that users can share their personal link. eg. app.com/signup?r=username

const queryParams = new URLSearchParams(window.location.search);
const r = queryParams.get('r');
console.log(r); 

I can then save the referrer ID in the database when the user signs up, but i know this will not persist if the user views another page and then comes back to the signup form.

I think maybe setting a cookie that lasts for 30 days and then using this as the referrer ID on signup.

So my question is, how can i implement cookie based referrals in to a reactJS signup form?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!