Restrict Key CFWheels URL Variables from Google Analytics
November 7, 2011 · Chris Peters
Here's a little tip to keep anyone in your organization using Google Analytics from accidentally reloading your CFWheels application in the wrong environment.
Here’s a little tip to keep anyone in your organization using Google Analytics from accidentally reloading your CFWheels application in the wrong environment.
Problem: People Can See Your Reload URLs
You wouldn’t think that Google Analytics would have anything to do with this, but consider this scenario:
- A non-technical teammate of yours runs some content reports in Google Analytics.
- The teammate keeps seeing a URL appearing in the reports that looks something like this:
/?reload=maintenance&password=123456
. - They eventually say to themselves, “Hmm, I wonder what that does. I’m going to click it.”
- You get an emergency call because your website is in maintenance mode all of a sudden, and you’re not sure why it happened.
Solution: Exclude URL Query Parameters Setting
The solution is pretty simple. You just need to go into the Google Analytics settings area for each of your CFWheels apps’ profiles and exclude the reload, password, and except URL paramaters from appearing in Google Analytics.
Your settings would look something like this:
Here’s how to get to the profile settings for your CFWheels app:
- Open the reports for each profile
- Click the Gear icon in the upper right
- Click the Profile Settings tab
- Edit the Exclude URL Query Parameters field.
More Information
- Edit Profile Settings article in Google Analytics Help
- Switching Environments chapter in ColdFusion on Wheels Reference Guide