Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

126
Visualizações
Appending parameters to onClick URL

We're trying to append UTM parameters to a calendly link. It was working great when it was a standard anchor link, but now the site dev has changed the button to an onClick event.

Here is the code we were using to append the parameters to the URL:

(function() {
var links = document.querySelectorAll('a');
    for (var i = 0; i < links.length; i++) {
      if (links[i].hostname == "calendly.com") {
        var calendlyLink = links[i];
        if({{Javascript - finalParams}} !== '?' || {{Javascript - finalParams}} !== 'undefined'){
        calendlyLink.href = calendlyLink.href + {{Javascript - finalParams}};
      console.log(calendlyLink);
            }
      }
    };
 
 })();

Here is the new button code:

<a class="demo-button" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/xxxxxx/product-demo'});return false;">Button Text</a>

What do I need to change to fix this so the UTM parameters are added to the URL?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The Calendly.initPopupWidget method accepts a utm parameter option that can be used to prefill the utm parameters in the iframe (see here)

<a class="demo-button" onclick="Calendly.initPopupWidget({url: 'https://calendly.com/xxxxxx/product-demo', utm: { utmSource: 'utmSource', utmCampaign: 'utmCampaign' } });return false;">Button Text</a>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda