• Page targeting

    Table of contents

    In short

    Page targeting determines on which pages of your website an experiment should be displayed. You have various options for this under Page Targeting in the dashboard. Valid page targeting is also required to be able to start an experiment. 

    Include or exclude URLs

    You can include or exclude URLs on which an experiment is played. To do this, you can use a drop-down above the input field to specify whether the URL should be included ("URL Matches these URLs") or excluded ("URL Does not match these URLs").

    You can then enter the corresponding URLs in the input field below. Add further URLs using the "+ Add Url" added.

    Matching Type

    To the right of the input field, you can specify the matching type of your targeting condition. Depending on the selection, the URL in the input field next to it is checked for various conditions. You have the following conditions to choose from:

    • Simple Match
    • Exact Match
    • Contains
    • Regex  

    The targeting conditions with application examples are explained in more detail below. 

    Simple Match

    At the Simple Match all URLs are targeted, including the associated URL parameters. 

    In the following example, you can see the versions of a URL that are used for page targeting Simple Match for the URL www.demo.de apply:

    URL Targeting trifft zu
    www.demo.de
    applies
    www.demo.de#about
    applies
    www.demo.de?color=red
    applies
    www.demo.de/category
    does not apply
    www.demo.com
    does not apply
    sub.demo.com
    does not apply

    If you want to target multiple pages, page types or subdomains at the same time, you have the option Regex. Just read on.

    Exact Match

    Use the condition Exact Matchif the page targeting explicitly only for a specific URL - without URL parameter - should apply.

    In the following example, you can see the versions of a URL that are used for page targeting Exact Match for the URL www.demo.de apply:

    URL Targeting trifft zu
    www.demo.de
    applies
    www.demo.de/
    does not apply
    www.demo.de#about
    does not apply
    www.demo.de?color=red
    does not apply
    www.demo.de/category
    does not apply
    www.demo.com
    does not apply
    sub.demo.com
    does not apply

    Contains

    The page targeting condition Contains you use when you several pages of a certain group you want to target. For example, if you want to run a test on product pages only, you could use "Contains" with "/products/" to include only these pages. The complete specified expression must appear at least once in the URL.

    In the following example, you can see different versions of URLs where the page targeting "/products/" applies.

    URL Targeting trifft zu
    www.demo.de
    does not apply
    www.demo.de/produkte
    does not apply
    www.demo.de/produkte/t-shirts
    applies
    www.demo.de/produkte/hosen
    applies
    www.demo.de/blog/produkte-reviews
    does not apply
    www.demo.de/blog/produkte/tests
    applies

    Regular Expressions (Regex)

    Regular expressions allow you to set your A/B tests to specific individual pages or page groups to target specifically. This may be more precise than, for example, with the targeting conditions just presented.

    We have created this guide to page targeting with regex to make it easier for you to get started with regex. In many cases, it is sufficient to copy one of our examples and replace your own URL.

    To validate your regular expressions you can use regex editors like regexr.com.

    Example of creating a regex

    On Plomo-o-Plata on all product detail pages in the category Outlet Sale the sales prices will be displayed in red. Product detail pages in other categories should remain unchanged.

    By using regex in URL targeting you have the possibility to explicitly map this targeting condition.

    As an example, here you can see a URL that is located in the Outlet Sale category.

    https://plomo-o-plata.de/collections/plomo-o-plata-outlet-sale/products/plomo-o-plata-bandeau-leo-foulard-gruen

    The structure of the URLs is the same for all product detail pages that can be found in this category:

    https://plomo-o-plata.de/collections/plomo-o-plata-outlet-sale/products/…

    In the table Useful use cases you will find predefined regexes that you can apply to your website URL structure using this example. In our case, use case 3 applies.

    -> Targeting of all pages that are www.demo.de/category/ after the path.

    -> ^.*www\.demo\.de\/category\/.+

    First, we go to https://regexr.com/ and transfer the similar use case.

    We can now use this use case as a guide, and apply it to our example of Plomo-o-Plata. 

    In the screenshot you can see how we customized the regex to our use case. Since the URL of Plomo-o-Plata had two more directories than the use case, they were added analogously to the use case example. Another very useful tool to define regex is: https://www.autoregex.xyz/ Here you can define in English which page types should be targeted. The tool converts this specification into a regex.

    Useful use cases

    Use case Example page Regular Expression
    Targeting exactly one page
    www.demo.de/product-list
    ^.*www\.demo\.de\/product-list$
    Targeting exactly one page incl. anchor links, parameters, and optional "/".
    www.demo.de/?utm_source=google_cpc
    ^.*www\.demo\.de(#.*|\/#.*|$|\/$|\/\?.*)
    Targeting of all pages hung in the path www.demo.de/category/
    www.demo.de/category/product
    ^.*www\.demo\.de\/category\/.+
    Global targeting of a page without "www."
    demo.de/
    ^.*demo.de\/.*
    Global targeting on the entire domain www.demo.de/
    www.demo.de/
    ^.*www\.demo.de\/.*
    Targeting on a subdomain blog.demo.de/
    blog.demo.de/category/article
    ^.*blog\.demo.de\/.
    Targeting on an entire domain incl. subdomains demo.de/
    blog.demo.de/category/article www.demo.de/category/product
    ^.*\.demo.de\/.*
    Targeting on two specific product categories
    www.demo.de/shirts/product www.demo.de/pants/product
    ^.*www\.demo.de\/(shirts|pants)\/.*

    Need help setting up your regex? No problem!

    Just send us a message with the page group you want to target. We will send you the appropriate regex as soon as possible.

    Use Cases

    Targeting parameters

    With page targeting, an experiment can be displayed for specific URL parameters. To do this, enter the desired URL parameter in the page targeting for which the experiment is to be played. In this example: "landingpage=new".

    Then select the "Contains" option as the matching type for the parameter.

    This activates the experiment as soon as the URL contains either the parameter "?landingpage=new" or "&landingpage=new".

    Use parameter targeting for email marketing or Google Ads campaigns, for example. This allows you to create landing pages specifically tailored to your advertising media.

  • First steps

    Tracking & Evaluation

    Targeting

    Advanced

    Function overview