CrazyEgg is a remote testing analytics tool that tracks click and scroll data in web interfaces. Whilst CrazyEgg includes functionality to enable customisable URL tracking rules, it doesn’t explain how to use RegEx to easily exclude the index of a folder.

This can be an issue if you:

  • cannot easily remove the tracking JavaScript from the index
  • need to simultaneously track the index and its child interfaces
  • cannot chunk the children into a separate folder

RegEx to the rescue!

The following RegEx will enable CrazyEgg to ignore an index but track its children:
http://www.domain.com/staff-profiles/.+$ index not tracked
http://www.domain.com/staff-profiles/john-smith/ child tracked

Hat tip: Steve Jordan, Web Developer.

Update from CrazyEgg support

“Regular Expression are not really good at exclusions. Try something like the follow [sic]”:
^https?://www\.domain\.com/staff\-profiles/[^index]

About The Author

I blog about how to collaborate to design simple, usable and inclusive information experiences that make the lives of customers easier. Read more in the blog Categories and Tags.

Close