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

223
Vistas
How to pass a value to a variable created in Google Tag manager?

I have created a variable in GTM code to fetch emails but It needs to collect the data from the thankyou page Script. I have used Zoho forms to do this. Can somebody help?

Here's the function I'm using:

function() { 
  try { 
    var searchEmail = function(input) { 
      for(i=0; i<input.length; i++) { 
        email = input[i].value; 
        if(email.match(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i)) { 
          return email; 
        } 
       } 
    } 
    return searchEmail({{Form Element}}); 
  } catch(e) { 
    return ""; 
  } 
} 

The idea is that the code you put in on the thank-you page passes the emailInput variable to the script you put in the thank-you page.

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