The Where section is part of the targeting step, along with the choice of the Visitor Segment (Who section), the Triggering conditions (How section) and the Frequency conditions (When section).
đ How it works
Configuring the targeted pages of your website means specifying the page(s) for which the changes made via the visual editor/ code editor will be seen by your visitors. This configuration is made inside the targeting interface, on the same page as the segment configuration, in the âwhereâ section.Â
The targeted pages set-up applies differently regarding the type of campaign:
- AB Tests: it applies to your whole AB Test, meaning the original variation (V0) and all the variations (V1, V2, and V3 for an A/B/C/D test, for example) for a test
- Multipages tests and Multipages patches: it applies to the selected sub-test. Use the dropdown to navigate between sub-tests and choose the right pages for each of them
- Personalizations: it applies to the selected scenario for the personalization campaigns. Use the dropdown to navigate between scenarios and choose the right pages for each of them
- Patches: only one scenario and a 100% allocation traffic, no specific rule
- AA Tests: only one scenario and a 100% allocation traffic, no specific rule
Single-page Experiences vs. Multipage Experiences
- For A/B Tests, Simple Personalizations, and Patches, youâll have to define one single targeted page rule for your campaign because these types of campaigns have only one âexperienceâ (one type of new content generated with AB Tasty to display).
- For Multipage Tests, Multivariate Tests, Multipage Personalizations, and Multi-experience Personalizations, youâll have to define a targeted pages rule for each âexperienceâ or "sub-test". This rule can be the same or different depending on your needs.Â
Best practices
-
Use different targeted pages for Multipage Tests and Multipage Personalizations. This is the objective of these kinds of campaigns: displaying several different messages (the experiences, to create a relevant and complete user journey) on several different targeted pages.
-
Use the same targeted pages for Multivariate tests if youâre testing a combination of several changes on the same page and try to discover the better combination (color of the CTA, small style banner, new product carousel on a product page)
- Use the same targeted pages for Multiexperience Personalizations: this kind of campaign has been designed to help you to launch several messages to different segments in the same campaign and to assure no overlap between messages. To learn more about them, please refer to this article
âď¸In any case: Donât forget to use the dropdown menu on the Targeting page to switch between experiences to set up your targeted pages in every experience.
We also offer a âReplicateâ option, which allows you to replicate the full targeting setup or one part of the targeting setup of one experience in another experience, or in all experiences.
For more information refer to this section and this specific article.Â
âď¸ Configuration of the targeted pages
To target your campaign, you can either use a saved Page, configure URL(s) using the URL operators, target all pages, targeting on an event, use the target by ID/Class/Element option, use the target by code option, use the targeting verification option.
Let's have a closer look on the interface and its possibilities.
When you land on the page, youâll find the following set-up:Â
- The operator "is" selected by default
- The URL youâve used in Step 1 Main Information page to load the Visual Editor which is pre-pasted in the URL field
-
Additional options:
- Add conditionÂ
- CSS selector option
- Code option
- target by event option checkbox
âď¸Be careful: the URL field is case sensitive (i.e. a targeting 'contains' 'CHECKOUT' will not affect visitors on a URL like 'https://abtasty.com/checkout/' to the campaign).
Using operators to target the right URL(s)
The dropdown will present you with several options, in this order:
-
Inclusive operators: is, is exactly, contains, is regular expression, and is saved page
-
Exclusive operators: is not, is not exactly, does not contain, is not regular expression, and is not saved page
- Target All URLs: it will target your campaign on all your website pages where the AB Tasty generic tag has been installed.
Caution: If you have several sub-domains for all of the languages or countries youâre addressing, your campaign will be displayed on all of them. Use this option with caution, if you are sure that your campaign should be targeted on 100% of the pages of your domain. For more information about the way you've set-up your account regarding domains, please refer to this article.
Details about inclusive and exclusive operators
This is the matrix about the way the operators work:Â
Operator | Functional: accepts... |
is |
Includes all URLs matching the string, even if they include parameters. â ď¸ With this operator, the page is targeted no matter which parameters are included in the URL. Therefore, you cannot write any particular parameter in this field. Example: https://mydomain.com/cart |
is exactly |
Includes the unique URL matching the exact string. Parameters that are not mentioned in the string are not taken into account. đĄ This field accepts parameters as an option. Example: https://mydomain.com/cart?news |
contains |
Includes all URLs containing the string. Parameters following the string will also be taken into account. Example: /product/ |
is regular expression |
Includes all URLs matching the regex. You donât need to escape special characters of your regular expression. Example: https://www.example.com /products/(.*)--([0-9]{5}) |
is not |
Excludes all URLs matching the string, even if they include parameters. â ď¸ This field doesnât accept parameters. Example: https://mydomain.com/cart |
is not exactly |
Excludes the URL matching the exact string. đĄ This field accepts parameters as an option. Example: https://mydomain.com/cart |
does not contain |
Excludes all URLs containing the string. Parameters following the string will also be taken into account. Example: /product/ |
is not regular expression |
Excludes all URLs matching the regex. You donât need to escape special characters of your regular expression. Example: https://www.example.com /products/(.*)--([0-9]{5}) |
To learn how to manipulate operators to build the correct pages targeting, please refer to this complete article.Â
Using saved pages
From the dropdown, you can access the list of the saved pages youâve previously set up in the page builder. For that, you just have to select the following operator:Â
- Is saved PageÂ
- Is not saved PageÂ
You can access the page builder by clicking on âManage Saved Pagesâ.
Please refer to this article for more information.Â
Useful tip: You can see the content of the setup of your saved pages by hovering over them:Â
You can directly click on the saved page you want to include/exclude by using the dedicated âis saved pageâ option in the previous dropdown.Â
You can mix the inclusion of saved pages with the exclusion of saved pages by clicking on âAdd Conditionâ.Â
You can also mix saved pages with custom URLs.Â
In any case, the functional rules between inclusions and exclusions are the same for the setup by URLs:Â
- Inclusion(s) only: If you include one or several specific URL(s) and saved pages, all the other URLs will automatically be excluded from the targeting. At least one of them has to match.
- Exclusion(s) only: If you exclude one or several specific URL(s) and saved pages, all the other URLs will automatically be included in your targeting configuration.
-
Combination of inclusions and exclusions: You can combine inclusive rules with exclusive rules. In this case, to be accepted in the targeting, a websiteâs URL has to match:
- All the exclusion rules
- At least one of the inclusion rules
Using the CSS selector option
Use the CSS selector option if you want to display changes on the pages of your website containing an element linked to a specific ID or class, whose presence cannot be determined by a URL. It is useful for targeting a set of pages that don't share a specific URL structure.Â
You can choose between the ID of your element, the CSS class, or any other parameters (custom choice in the dropdown). If the element you want to declare exists on the page youâve loaded in the editor, it will appear while beginning to fill in the field by auto-completion.
âď¸Caution: Donât forget to add a â.â for a class or a â#â for an ID.Â
This option is compatible with other options in the section, except for the Target All URLs option.
The option "My element appears after page load" is useful if you element is loaded after the page load (dynamic element such as a popin for exanple).
Important âĄď¸: When you use this option with targeted URLs, the operator between both options will be AND. Meaning that the targeted pages will have to respect both rules in the targeted URLs section and the class option section.Â
For more information on this option, refer to ID/Class/Element option.
Using code option
The code-based option enables you to insert JavaScript code to trigger a campaign depending on the presence of a specific JS instruction.
This option is compatible with other options in the section, except for the Target All URLs option.
When using this option, you must comply with the following rules:
- Do not use a function (){ at the beginning of your code.
- The function/condition you code must return a true or false value.
- If you plan to use jQuery, you must enable the use of jQuery in Settings. In this case, go to Account Management â Framework and select Load AB Tastyâs jQuery.
For more information on this option, refer to Using the code-based option.
Triggering your whole campaign by event
In some instances, you might want to launch a test after a user completes a certain action on your site, for example, after they have clicked a certain button, or after they have spent a certain length of time on a given page.
You can condition a test in this way using the JavaScript function ABTastyStartTest. This function takes a single, unique parameter: the ID of the test you would like to launch. It must be called after the AB Tasty tag.
The function takes the following form:
ABTastyStartTest(testID); //
Where testID is the ID of the campaign to be launched.
This function must be called as soon as each visitor has completed the action on which the test is performed. Note: the tested page must be the page on which the action takes place (you cannot test modifications on another page).
To create a test conditioned on an event, you must:
- Create a standard campaign, applying your desired modifications
- Tick the checkbox âTarget by Eventâ in the targeting options window, in the same box as the URL targeting options. Note that other targeting options will no longer be available
- Set up the rest of your campaign as usual
- Launch your campaign
- Call the function ABTastyStartTest directly from your application whenever the event occurs.
- For example, if you would like test 12345 (set up in advance) to be triggered by a click on a button, you can do this in the following way:
<button onclick='ABTastyStartTest(12345)'>Launch a test from this button</button>
You can use any other method which links this function to an event. For example, you could use jQuery, or a callback function might be used if your site uses AJAX.
ATTENTION! When you use this function the tag does not check the targeting, including the QA parameters. Take extra care when pushing a campaign that is using an event-based targeting into production.
Â
đĄ Use cases
Targeting a set of pages
To target a set of the same types of pages (all product pages or category pages of your website, for instance), you can choose from the two configurations below:
URL operator |
Contains |
Full URL |
http://mydomain.com/category/ |
Result |
The changes are applied to all pages for which the AB Tasty platform has identified a common section of URL. |
Example of a URL |
You will target the http://mydomain.com/category/page1 page, but also http://mydomain.com/category/page1/article.html. |
Â
Good to know đĄ
If some of your pages are secure and use the HTTPS protocol, you will need to configure targeting using the Contains option and www.mydomain.com/category as the full URL.Â
Â
URL operator |
matches Regular expression |
Full URL |
http://www.example.com/products/(.*)--([0-9]{5}) (For example if your URLs match the following format: http://www.example.com/products/product-name--12345, where 12345 coincides with a 5-digit product ID) |
Result |
A regular expression enables you to use a strict writing rule to define the pages to be targeted. This guarantees that you will include only the pages that need to be, particularly if your pages share a structure and include a set of digits and letters. Refer to the http://rubular.com/ page to test your regular expressions or contact your CSM if you need help writing them.    |
Example of a URL |
You will target the http://www.example.com/products/shoes-children--96753.html or http://www.example.com/products/garden-furniture--13082 pages. |
Â
Targeting all pages
To target all the pages of your website, use one of the two configurations below:
URL operator |
Contains |
Full URL |
http://mydomain.com |
Result |
The changes will be applied to all the pages of the website on which the tag is implemented.    |
Example of a URL |
You will target the http://mydomain.com page, as well as http://www.mydomain.com/category/page1/article.html and even http://www.mydomain.com/cart. |
Or
Select the Target all pages option.
Â
Need additional information?
Submit your request at product.feedback@abtasty.com
Always happy to help!Â