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

330
Vistas
Why do I have to use conditional when using JS in VWO?

I'm doing an A/B test, but I noticed that I have to change everything via JS, I just don't understand why I can't just use something like this:

document.getElementById("myDIV").style.background = "url('smiley.gif')

Here is an example of a code used in VWO with JS

  function colpromo() {
      if (typeof (catalogpageloaded) == 'undefined') {
        window.catalogpageloaded = 'loaded';
        // javascript changes here
        /*Eliminating content*/
        const BANNER = document.querySelector(".col-promo-with-cta-module");
        BANNER.remove();
        const HERO = document.querySelector(".hero-content .hero-content-wrapper ");
        const HERO_CHILDREN = Array.from(HERO.children);
        HERO_CHILDREN[2].remove();
        HERO_CHILDREN[3].remove();

Is there any documentation on how to use JS to do an A/B test?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can try firing your JS code on console of dev tools and see if it gives you the desired output. If yes, it should work fine via VWO code editor as well. Extra code will not be needed then.

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