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

199
Vistas
How to get specific element from page to variable in Google Tag Manager

I have this kind of cookie in code on page. I would like to get language out of it.

I mean how could I this function return in this example "en" in GTM variable:

function() {return ...}

Code in page looks like:

<script type="text/javascript" id="wtml-cookie-js-extra">
var wtml_cookies = {"wp-wtml_current_language":{"value":"en","expires":1,"path":"\/"}};
var wtml_cookies = {"wp-wtml_current_language":{"value":"en","expires":1,"path":"\/"}};</script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Global variables like that are accessible in the window object. This code should do it:

function() {
  return window.wtml_cookies["wp-wtml_current_language"]["value"];
}
about 4 years ago · Juan Pablo Isaza Denunciar
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