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

92
Views
Cómo enviar valor dinámico al evento webengage usando React js

He estado tratando de agregar el valor dinámico a WebEngage pero fallé,

 webengage.track("Added To Cart", { courseName: "JS Advanced", courseType: "A", coursePrice: "N/A", discount: "N/A", pageScroll: "5" // this will be vary between 0 to 100 });

Puedo rastrear los valores estáticos, pero el valor dinámico no se rastrea en webengage usando React js.

Creo que lo había intentado hasta ahora son:

  1. Reacciona la función de limpieza.
 useEffect(() => (window as any).webengage.track("Page Viewed", {...webengageData}), []);
  1. JS beforeUnload evento.
 useEffect(() => { window.addEventListener("beforeUnload", handleWebengge); return () => { window.removeEventListener("beforeUnload", handleWebengge); handleWebengge(); }; }, []); const handleWebengge = () => { (window as any).webengage.track("Page Viewed", webengageData); };
  1. Evento de descarga de JS
 useEffect(() => { window.addEventListener("unload", handleWebengge); return () => { window.removeEventListener("unload", handleWebengge); handleWebengge(); }; }, []); const handleWebengge = () => { (window as any).webengage.track("Page Viewed", webengageData); };

¿Hay alguna manera cuando cierro o me muevo a otras páginas puedo presionar el evento y rastrear el evento en React?

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!