Category Archives: Google Analytics

How to Strip URL Parameters Using Google Tag Manager

This is the blog post to accompany my video tutorial on how to Strip URL Parameters from Google Analytics Page Views using Google Tag Manager: The following code overrides the page location stripping myparam from the URL: function() { var path = {{Page Path}}, query = {{URL Query Parameters}}, queryOverride = query.replace(/&myparam(\=[^&]*)?(?=&|$)|^myparam(\=[^&]*)?(&|$)/, “”), cleanedPath = […]