Harper College

Scripts

UTM Removal Script

This page contains a script that removes UTM parameters from the URL. This is used on landing pages for vanity URLs that utilize UTM parameters for tracking purposes. To test this out, visit: https://www.harpercollege.edu/webteam/scripts.php?utm_medium=redirect

A moment after the page loads, the script will remove the part of the URL after the question mark (?). This logs the UTM parameters for tracking purposes while also minimizing the opportunity for end users to copy the URL with UTM parameters and use it for other purposes (like using it in an email signature line), which might throwing off the tracking.

To add the UTM Removal Script to a page, add this script to the <footcode> tags of a page.

<script src="/_resources/js/gtm-scripts/freshurl.js" defer="defer"></script><!--removes UTM paramters from URL-->

Last Updated: 1/21/26