Javascript to hide URL parameters in address bar? [Solved]


Userlevel 6
Badge +3

Is there a javascript I can use to hide the URL parameters in the address bar? I would like it to still change the dynamic text on the page but it’s preferable if the user can’t see that information in the URL.


Update: We found a solution that works! 🎉

All you have to do is install a super-simple script on your page then voila! - No more URL parameters in the address bar! Download the script and instructions below. 🙂

How to Install

Step 1.

Go grab this script that was created by the good folks at Wistia.

Step 2.

Install it on your Unbounce landing page in the javascripts section, with placement set to Head.

Step 3.

Celebrate!


Can’t see the instructions? Log-in or join the Community to get access immediately. 🚀


4 replies

There’s a script by the guys at Wistia that may do what you’re looking for:

https://github.com/wistia/fresh-url

Thanks for sharing this, Robert! And just a friendly reminder, this is only for cleaning up your URL’s. 

i’ve used HTML5 instead of Javascript u may give a try
check it here : https://rameshsai.wordpress.com/2016/11/28/hide-url-parameters/

Userlevel 6
Badge +1

There are ways to mask URLs we have done this successfully in Unbounce with iframes - but could potentially lead to other issues.

See the section " URL masking with an iframe tag" http://www.willmaster.com/library/web-development/url-masking.php but again use at own risk. And a reminder the other options on that page will not work with Unbounce.

Reply