Custom Properties let you build audiences using information that is specific to your visitors or customers.
For example, you could identify visitors based on:
- Subscription plan
- Customer type
- Account value
- Number of purchases
- Lead score
Custom Properties are sent from your website to Crazy Egg using JavaScript. Once Crazy Egg has received a property, it can be used with Crazy Egg features that support Custom Properties.
Before You Begin
Before using Custom Properties:
- Make sure the Crazy Egg tracking script is installed on your site.
- Custom Properties support text and number values.
- Do not send passwords, payment information, sensitive personal information, or other confidential data.
- Property names and text values are case-sensitive. For example,
Proandproare treated as different values.
Pass Custom Properties to Crazy Egg
Use CE2.trackEvent() to send Custom Properties to Crazy Egg.
Add the properties you want to use inside userProperties.
CE2.trackEvent({
name: 'customer_profile',
userProperties: {
plan: 'Pro',
customerType: 'Business',
lifetimeValue: 1250,
purchaseCount: 8
}
});
The name field identifies the custom event.
Each item inside userProperties contains:
- A property name, such as
plan - The visitor’s current value, such as
Pro
For example:
plan: 'Pro'
or:
lifetimeValue: 1250
Send Properties Before They Are Needed
Crazy Egg needs to receive a Custom Property before it can use that property as part of an audience.
We recommend sending the property as early in the visitor’s journey as reasonably possible so it is available when Crazy Egg needs to evaluate the visitor against an audience.
For example, if you want to use a visitor’s subscription plan as an audience condition, send the plan property as soon as your site knows the visitor’s plan.
Use a Custom Property in an Audience
When configuring a Crazy Egg feature that supports Custom Properties:
- Open the Audience settings for the feature you are configuring.
- Select Custom Properties.
- Choose the property you want to use.
- Select an operator and enter or select the value you want to use.
- Finish configuring the Audience and the feature.
For example, you could create an audience using:
plan = Pro
or:
purchaseCount > 5
The available operators and setup options may depend on the feature you are configuring.
Using Custom Properties with A/B Testing
Custom Properties can be used to control who is eligible to see an A/B Test.
For example, you could create a test specifically for:
- Visitors on a
Prosubscription - Business customers
- Customers with a certain account value
- Customers who have completed a minimum number of purchases
When setting up the A/B Test, continue until you reach the Audience section. Choose to target specific visitors, then select the appropriate Custom Property 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 Custom Properties with Other Features
The same Custom Properties can be reused by other Crazy Egg features that support them.
For example, a plan property originally added for an A/B Test can also be used by other supported Crazy Egg features without requiring you to create a different property.
This means you can send information about a visitor once and use it anywhere Custom Properties are supported.
If a Custom Property Does Not Appear
If you do not see a property when configuring an audience, check that:
- Crazy Egg has received at least one event containing the property.
- The property was sent from the same site you are configuring.
- The property contains a supported text or number value.
- The property name matches exactly, including capitalization.
- The event was sent successfully after the Crazy Egg tracking script loaded.
Boolean values, arrays, and objects cannot currently be used as Custom Property conditions.
Custom Property Limits
The following limits apply:
- Up to 25 properties can be sent in a single event.
- An account can register up to 100 unique property names across its sites.
- Property names can contain up to 100 characters.
- Text values can contain up to 1,024 characters.
- Empty or invalid property objects are ignored.
Summary
Custom Properties let you create audiences using information your website already knows about a visitor, such as their plan, customer type, account value, or purchase history.
Pass the information to Crazy Egg using userProperties, then use those properties as conditions in the Audience settings of supported Crazy Egg features.