๐Ÿ‘‰ Defining targeting verification

๐Ÿ“– Definition

When a page loads, the AB Tasty tag verifies the targeting conditions. At this point, the URL of the page, the elements used to trigger the campaign (ID/Class/Element option), the segment and the defined trigger can be detected. The campaign is only displayed to visitors who meet the targeting conditions.
However, some elements are called after the page has initially loaded, with a slight delay, or after the visitor completes a certain action. This is why, in some cases, they do not appear on your pages once the test is launched.

โญ Good to know

The verification interval is based on the โ€˜setTimeoutโ€™ JavaScript function, which verifies the URL targeting first. If the URL doesnโ€™t match the set-up configured in the target pages, the campaign wonโ€™t trigger. If it does, the verification applies as follows: the targeting configuration is verified (id/class/element, segment, trigger). If the function returns false, which means that conditions are not met, the โ€˜setTimeoutโ€™ function is called and will detect if the element appears after the specified delay. If the element is never detected, the campaign wonโ€™t be triggered for the chosen visitor segment.

 

โš™๏ธ Configuration

To determine how the targeting verification will be performed, you must select one of the 2 targeting verification options:

Targeting_verification.png

โญ Good to know

A โ€œRecommendedโ€ label is displayed next to the option we recommend using. The second option is recommended when you have at least one criterion which requires it. The list of all the configured criteria requiring this option is displayed.

Targeting is verified when the page loads

This option is selected by default. Most targeting criteria can be validated when the page loads. If none of criteria you have configured require the second option, in other words, if the second option is not recommended, you can keep this option.

 

Targeting is verified at regular intervals until the conditions are met

This option is useful when your campaign targeting includes one or several criteria that cannot be verified on page load. For example:

  • When using the ID/Class/Element triggering criteria
  • When using a segment based on one or several segmentation criteria that are not available on page load such as datalayer variables (which can display after a small delay) or some DMPs.
  • When defining a specific custom code in the targeting step to refine the triggering conditions. 

For example, on a travel website, the โ€˜Bookโ€™ CTA only appears once the visitor has selected their travel dates. Selecting this option allows the tag to verify the conditions at regular intervals until they are met (when the element is finally loaded and appears).

  • If the triggering conditions are met at one point during the multiple verifications, the campaign will be triggered on the page. 
  • However, if the triggering conditions are never met, the campaign wonโ€™t be triggered on the page. 

In other words, the campaign is triggered on the page only if the conditions are met at some point during the verification.

โญ Good to know

When creating a custom code trigger, you can use JavaScript Promises, which enable you to wait for a specific event to happen without impacting your overall website performance. We recommend using them as much as possible.
When using a Promise in the custom code trigger, the setTimeout() function won't apply and the AB Tasty tag will wait for your own function to resolve.

 

๐Ÿ’ก Use case

You may want to change the color of the popin that appears when the user clicks Add to cart on the product page of your website. This popin is not natively on your product page but appears after the user has completed a specific action. In this case, you must select the At regular intervals until the conditions are met option. To do so, apply the following steps:

  1. In the Where section, select single-use URL(s) in the drop-down list.
  2. Select contains and enter the URL that matches your product pages.
  3. In the How section, select the ID/Class/Element triggering criteria, select ID and enter the ID of your popin. 
  4. Select the At regular intervals until the conditions are met option.

This way, AB Tasty will check whether the popin appears on the page at regular intervals. When the popin is loaded and appears, the modifications are applied.

 

Need additional information?

Submit your request at product.feedback@abtasty.com

Always happy to help! 

ALY-PROF.png

Was this article helpful?

/