Track by Name

The default tracking method for a snapshot is to track using the URL; this is not ideal for A/B tests because different variants/test pages can be served from the same URL. Track by Name solves this problem. When tracking by name, we will determine which page to track based on the Track by Name code instead of the URL.

Snapshot Setup
A snapshot must be added for each variant you'd like to track.

  1. Add a new snapshot using the direct variant URL
  2. Set the snapshot to Track by Name under Advanced Options
  3. The Track by Name code that is presented will need to be placed on the variant page before the standard Crazy Egg tracking script, example below.


<!— Track a specific Crazy Egg snapshot by name —>
<script type="text/javascript">
    var CE_SNAPSHOT_NAME = "Variant A";
</script>

<script type="text/javascript">
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0000/0000.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
</script>


Note: The Track by Name code is based on the title for the snapshot, if at anytime the snapshot name is changed the Track by Name code must also be updated on your variant page.



Support article

Was this article helpful?

Thank you! Your feedback is important to us.

Your feedback is greatly appreciated!

Support helper

Need more help?

Contact Support

Your message has been sent! Send another message.

We're standing by to give you a hand.