How do I check for CrazyEgg in Javascript?
If you have some javascript that you don’t want to fire while viewing your report in CrazyEgg…
Or if you have some javascript that you want to ONLY fire while viewing your CrazyEgg reports…
You can use javascript to check if your report is being loaded inside of our reports or not.
if (ce_overlay_loaded) {alert('this is a CrazyEgg report')};
if (!ce_overlay_loaded) {alert('this is NOT a CrazyEgg report')};
Some scripts that you wouldn’t want to include inside of a CrazyEgg report…
- Frame busting javascript
- Debugging code
- User tracking code
Sometimes a website will have stuff on it that is hidden by default. If there is stuff on your pages that is hidden when CrazyEgg takes a screenshot of it then it’s not going to be visible in your reports. With this trick you can show that hidden stuff by default in your CrazyEgg reports so that you’ll be able to see all your data on it.
When you view your reports, the CrazyEgg html parser strips out a number of scripts that might cause your report to break. If you notice something that we aren’t catching that might be interfering with your reports, go ahead and block it yourself with this trick.