How to Exclude Elements from being Tracked

You can tell Crazy Egg to ignore certain elements with the CSS class -ce-ignore. Simply assign this class to an element and our script will not track clicks on it or its contents:

<p class="-ce-ignore">
Neither <em>this</em> paragraph,
nor its <a href="a">child</a>
<a href="b">elements</a>, will be
<a href="c">tracked</a>.
</p>	

If your element already has a class attribute, you can just add  -ce-ignore as an additional CSS class:

<div class="sidebar -ce-ignore">
...
</div>

You can also mark elements as ignored via Javascript:

(window.CE_API || (window.CE_API = [])).push(function(){
var el = document.getElementById('ignore-me');
CE2.ignore(el);
});	

There is a risk of creating duplicate click data when you are implementing your own tracking behavior. Two clicks could be tracked for each real click from a visitor: one by your custom code and another by the default Crazy Egg click handler.

Was this article helpful?

Related Articles

Need Support?

Can’t find the answer you’re looking for? Don’t worry we’re here to help!

Submit a request