Skip to main content

On Page Load Append Param to URL

By May 30, 2020No Comments

Basically just append a parameter to the location (URL) when page loads. In the example below I am including a WordPress page title in the URL.

var your_message = <?php echo json_encode(get_the_title());?>;
if('?') === -1) { += '&your-message=I would like to learn more about your '+your_message+' :)';}

Contact us to learn more about Adopt the Web for your business

Author Jarod Thornton

More posts by Jarod Thornton