Step 1
How it works
The values stay in the visitor’s browser. When a visitor loads the page, the PrismCue script checks each test’s audience against the values that page has set. A visitor only sees a test whose audience matches.
Audience rules are part of the test. They are delivered to visitors’ browsers with the test, so a rule that names a value, such as email is abc@gmail.com, is visible to every visitor who loads the page. Name a group rather than a person where you can, for example email ends with @example.com.
Step 2
Send properties from your page
Set the properties before the PrismCue script loads, or after the page changes in a single-page app.
Before the script:
<script>
window.PRISMCUE_ATTRIBUTES = { plan: 'annual', tier: 3, paid: true, tags: ['wishlist', 'newsletter'] };
</script>After the page loads, for example once a visitor signs in:
window.prismcue.setAttributes({ plan: 'annual', tags: ['newsletter'] });New values apply the next time PrismCue checks the page, which happens on navigation. A visitor who is already in a test variant keeps that variant.
Step 3
Limits, types and reserved names
- Up to 20 properties per visitor.
- Names use lowercase letters, numbers and underscores, start with a letter, and have at most 40 characters, for example
planoraccount_region. - The names
device,newVisitorandsourceare reserved for PrismCue. - A value is text up to 100 characters, a number, or
trueorfalse. Email addresses and phone numbers are allowed. - A list is up to 20 values of the same kind.
A condition has a type: text (the default), number, or yes or no. Numbers may arrive as text: "12" counts as 12, and "TRUE" or "false" counts as true or false. A value that does not fit the type, such as "12px" for a number, does not match and is reported on the results page.
An invalid property is ignored on its own, and the valid ones still apply. Nothing is shown to the visitor.
Step 4
Target a test
- In the extension, open the Audience step and choose Custom property.
- Enter the property name exactly as your page sends it, and choose its type.
- Choose an operator. For text:
is,is one of,contains,starts with,ends withoris set. For numbers:is,is one of,less than,less than or equal,greater than,greater than or equaloris set. For yes or no:isoris set. - Enter the value, or a list of up to 10 values for
is one of.
Lists. If your page sends a list, such as a list of tags, tick The site sends a list of values. Then choose includes (the list has the value), has any of (the list has at least one of several values) or is set.
A test can have up to three conditions, and every condition must match. Examples:
| Show the test to | Condition |
|---|---|
| Visitors on the annual plan | plan is annual |
| Visitors with an @example.com address | email ends with @example.com |
| Visitors whose account has a region | account_region is set |
| Visitors who wishlisted something | tags includes wishlist (a list) |
Step 5
Saved segments
A segment is a named group of up to three property conditions that every test in your workspace can use. Create it in the extension’s Audience step, or on the Segments page of the dashboard, and then choose it as a condition of any test’s audience.
- A segment used by a running test cannot be changed until that test is paused or stopped, so the test’s results stay consistent.
- A segment used by any test cannot be deleted. Remove it from those tests first.
- Segments contain property conditions only; they cannot use other segments.
Step 6
Check results
When a visitor does not match a test because a property is missing, or has the wrong form, the script reports it once per visitor and test. The report names the property and the reason, never its value.
The results page then shows a warning for each property, with the share of visitors who reached the audience. A missing property usually means the page does not send it yet. A wrong form usually means the value does not match the condition’s type, for example text where a number is expected. Fix the page, then compare again.
Privacy
What PrismCue does with these values
PrismCue never receives or stores the values your page sends. Matching happens in the visitor’s browser. What PrismCue receives is the name of a missing or mistyped property and the reason, with the test and the visitor’s random identifier. Audience rules you write are part of the test, as described in Step 1.
You decide which values you send, and you are responsible for telling your visitors about them, as you would for any analytics or personal data. Read the PrismCue privacy policy for what we store.