Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda