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

159
Views
While connecting react with tawk. name and email are getting sent in encoded

this is my code in componentDidMount(){} I am trying to initialize the widget popup on page load and then setting the name and email from the received params from the previous page

 const fullName = this.state.data[0];
    console.log(fullName);
    const email = this.state.data[1];
    const hashCode = this.state.data[2];

    if (window.Tawk_API) {
      window.Tawk_API = window.Tawk_API || {};
      window.Tawk_LoadStart = new Date();
      window.Tawk_API.onLoad = function () {
        window.Tawk_API.setAttributes(
          {
            name: `${fullName}`,
            email: `${email}`,
            hash: `${hashCode}`,
          },
          function (error) {}
        );
      };
    }
    const tawk = document.getElementById("tawkId");
    if (tawk) {
      return window.Tawk_API;
    }
    const script = document.createElement("script");
    script.type = "text/javascript";
    script.id = "tawkId";
    script.async = true;
    script.setAttribute("crossorigin", "*");
    script.charset = "UTF-8";
    script.src = "https://embed.tawk.to/{id}/{id}";
    document.head.appendChild(script);

    const s0 = document.getElementsByTagName("script")[0];
    if (s0 || s0.parentNode) {
      s0.parentNode.insertBefore(script, s0);
    }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think you can post by element.

about 4 years ago · Juan Pablo Isaza Report
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!