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

95
Visualizações
How to override referrer in Google Analytics after refresh from window.location.href

Issue Steps:

  1. client search on google;
  2. google gives a link of mysite.com/page-a; and client clicks on the link
  3. At this point, the referrer is "www.google.com", which is correct
  4. There is internal logic in the website, redirect and refresh to new page mysite.com/page-b, via reset window.location.href, this needs to be kept
  5. At this point, the Google referrer is '', which it thinks the traffic is from its own website. (direct source, which is wrong)

How can I programmatically change to tell Google Analytics to reset the referrer?

Through js?: gtag("set","referrer", "www.google.com")
Or script?: https://www.googletagmanager.com/gtag/js?id=MyIDXXXXXX&dr=www.google.com 
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Well, first of all, you're supposed to be using a different field as per Google's Documentation:

gtag('set', 'page_referrer', 'https://example.com');

Secondly, you should mention whether you're using UA or GA4. I'm presuming GA4 due to gtag usage.

Finally, you can do it in GTM via setting the page_referrer field like so:

enter image description here

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