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

137
Visualizações
Hide query string from url when user redirects to page

I am currently using webflow to host my site. In the redirection section on the hosting tab. I added a 301 redirect query string that redirects to my index, I do this because I wanted to track where do the users come from in my site.

Read this article and try it out: https://www.newmediacampaigns.com/blog/how-to-track-landing-page-redirects-using-google-analytics

So basically it states this:

  • old path: /mexico
  • new path: example.com/?key=mexico

So for example i created a redirect /mexico to go to my index with a query string. Currently it works really well, but i want to know if it is possible that the user does not see the query string when entering from a redirect link.

For example when user enters by example.com/mexico, the url search bar shows only example.com

I tried hiding it using javascript, but does not work.

    var testURL = 'myurl';
    testURL.split('?')[0]; 

Any clue? or suggestion?

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

0

The only way to do this is with the history API - not available in older browsers.

The standard way of doing this is

history.pushState("object or state to represent your page", "page title", "/thenewurlpath");

You could add this to your document.ready callback, E.G.

$(document).ready(function(){
  history.pushState("something", "newtitle", "/thenewpath");
  // Whatever else your document.ready callback is doing...
})

Hope this helped :)

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