Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!