Use Tags with Audiences

Tags let you identify visitors based on specific behaviors, actions, or characteristics and use that information with Crazy Egg features that support Tags.
Depending on the tag, Crazy Egg may add it automatically based on visitor behavior, or you can create and pass your own custom tags.
For example, you could identify visitors who:

  • Experienced a JavaScript error
  • Rage clicked or dead clicked on a page
  • Added an item to their cart
  • Started or completed checkout
  • Submitted or abandoned a form
  • Logged in or signed up
  • Completed a specific action you track with a custom tag

How Tags Work

Tags can come from two sources:

Auto-Generated Tags

Crazy Egg automatically detects certain visitor behaviors and assigns tags when those behaviors occur.
Auto-generated tags include:

  • Error — A JavaScript error was detected.
  • Inactivity — No mouse movement, scrolling, or typing was detected for 90 seconds.
  • Rage Click — Multiple clicks were detected on the same element within a short period.
  • Dead Click — A visitor clicked an element that did not result in an expected action.
  • Slow Loading — First Contentful Paint took more than 3 seconds.
  • Add to Cart — An item was added to the shopping cart.
  • Checkout Start — The visitor started the checkout process.
  • Checkout Complete — The visitor completed checkout.
  • Submit Form — A form was submitted.
  • Resubmit Form — A form was submitted more than once.
  • Abandon Form — A form was abandoned.
  • Enter Email — An email address was entered into a form.
  • Signup — A signup action was detected.
  • Login — A login action was detected.
  • Search — A site search was detected.
  • Survey Response — A survey response was submitted.
  • Quickback — A visitor navigated to another page and returned to the previous page within 20 seconds.
  • Excessive Scroll — A visitor quickly scrolled up and down within the same area of a page.

You do not need to add JavaScript to create these tags. Crazy Egg adds them when the corresponding behavior is detected.

Custom Tags

You can also create your own tags for behaviors or visitor characteristics that are specific to your website.
For example, you might create tags such as:

  • Signed Up
  • Pro Plan
  • Viewed Pricing
  • Completed Onboarding
  • Returning Customer

To pass a custom tag to Crazy Egg, use:

(window.CE_API || (window.CE_API = [])).push(function(){
CE2.addTag('Signed Up');
});

To add multiple tags at once:

(window.CE_API || (window.CE_API = [])).push(function(){
CE2.addTag(['Signed Up', 'Pro Plan']);
});

Your website determines when the tag should be added. Run CE2.addTag() when the condition you want to track becomes true.

Add Tags Before They Are Needed

Crazy Egg needs the applicable tag to be associated with a visitor before it can use that tag as part of an audience.
For custom tags, run CE2.addTag() as soon as the behavior, action, or characteristic you want to track becomes known.
For example, if you want to use the Pro Plan tag as an audience condition, add the tag as soon as your site knows that the visitor is on the Pro plan.

Use a Tag in an Audience

When configuring a Crazy Egg feature that supports Tags:

  1. Open the Audience settings for the feature you are configuring.
  2. Select Tags.
  3. Select or enter the tag you want to use.
  4. Finish configuring the Audience and the feature.

For example, you could create an audience containing visitors with the Pro Plan tag or visitors who received the Checkout Complete tag.
The available setup options may depend on the Crazy Egg feature and plan you are using.

Using Tags with A/B Testing

Tags can be used to control who is eligible to see an A/B Test.
For example, you could create a test specifically for visitors who:

  • Are on a Pro Plan
  • Have Viewed Pricing
  • Have Completed Onboarding
  • Triggered a particular behavior detected by Crazy Egg

When setting up the A/B Test, continue until you reach the Audience section. Choose to target specific visitors, then select the appropriate Tags condition.
A visitor must meet both the Audience requirements and the other conditions of the A/B Test before they can see the test.

Using Tags Across Crazy Egg

The same tags can be reused by other Crazy Egg features that support Tags.
For example, a Checkout Complete or Pro Plan tag originally used for an A/B Test can also be used by other supported Crazy Egg features without requiring you to create a different tag.
This means you can define a visitor behavior or characteristic once and reuse that information across supported features.

Troubleshooting Custom Tags

If a custom tag does not appear or is not matching visitors as expected, check that:

  • The Crazy Egg tracking script is installed and loading correctly.
  • CE2.addTag() runs after Crazy Egg has initialized.
  • The condition that triggers your custom tag is actually being met.
  • The tag name matches the value you are using exactly.
  • The visitor receives the tag before the information is needed by the applicable feature.

Summary

Tags give you a flexible way to identify visitors based on behaviour, actions, or characteristics.
You can use Crazy Egg’s automatically generated tags for commonly detected behaviours or pass custom tags for actions and characteristics specific to your website. Once a tag is available, you can use it as a condition in the Audience settings of supported Crazy Egg features.

Was this article helpful?

Need Support?

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

Submit a request