You can use any of your site's cookies or information contained within these cookies to create custom targets. A potential use case for cookie-based targets is to target based on a cookie for a custom segment set by your analytics tool.
If you build a cookie-based target but it doesn't work, understand that the cookie must have a
domain attribute set, which then sets the cookie to
hostOnly. This configuration means that the cookie value can only be read by requests from servers within the host domain (
yourdomain.com). The cookie target evaluations are made by
monetate.net servers, which is why the cookie is not working as expected.
To work around this behavior, you must set a
domain attribute for the cookie when it is written by your script. Doing so removes the
hostOnly flag from the cookie and thus allow the platform to evaluate it for targeting purposes.
HTML Element–Based Targets
You can create a target based on the presence of specific DOM elements or the contents of DOM elements on your site.
A potential use case for HTML element–based targets is to target visitors who land on a page that contains the words out of stock within a specified page element.
navigator.userAgent— Target in-store kiosks or browsers not available in the WHO via their user agent string, such as
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136
document.referrer: Target users from a particular URL within your website, such as your site's cart at
document.title— Target users that see a webpage with specific title text as shown in the browser
Query Parameter–Based Targets
You can use any inbound query parameter or query parameter value to create custom targets. For example, you can target based on a query parameter when a customer arrives on your site from an email clickthrough.
An experience based on a query parameter target only shows when the parameter is present in the URL. If the URL contains the parameter
?source=email, then enter
source in the Query Parameter Name text field and
return variable; or some other instruction to return the value.
If there's no immediate match, then the target's code continues to run, waiting for a truthy value to be returned, for the length of time (in milliseconds) that you specify. This interval repeats until either there's a match or the total time (in milliseconds) that you specify has elapsed.
If the code return a true value before the target reaches the timeout threshold, then a retrack fires with the exact same data as the previous track with the target matched added but without a page view so that the page view counts aren't artificially inflated.
Use the Target DOM Event option on the Event tab to create a target that listens for a specific event, or type of interaction, related to an element that's taken either by a site visitor or the visitor's browser.
The events can include the following:
- Mouse events, such as
- Form events, such as
- Keyboard events, such as
- Window events, such as