Track Query String Params
Great for capturing referral info
Overview
Implementing
<script>
$(function() {
// Check the URL to see if we have any referral info to track
if (location.search != "") {
console.log("querystring found.");
const urlParams = new URLSearchParams(location.search);
if(urlParams.has('referrer')) {
window.tracker.track("referrer", urlParams.get("referrer"));
}
}
});
</script>Last updated