What is Page Targeting?

Our targeting options allow you to activate specific TruConversion features on specific pages of your site.

It is important to understand a typical URL first:


Each URL match you enter can be one of six types.

Quick definitions:

  • Simple Match: Simple match is the default URL match type, and is ideal for running experiments on single pages.
  • Exact Match: Exact Match URLs specify that this will work only when users load the exact URL entered.But if query or hash parameters are added or changed then Exact Match will not work.
  • Starts With: Target all pages which URL start in the entered text.
  • Ends With: Target all pages which URL ends in the specified way.
  • Contains: Target all pages which contain the specified URL / String.
  • Regular Expression: A regular expression (regex or regexp for short) is a special text string for describing a search pattern.
  • JavaScript Triggers:JavaScript trigger enables you to activate any of TruConversion feature at a specified moment during visitor session.

 

 

Find Details of Each URL Type:

 

1. Simple Match:

This is the default match type and is used to target a page on your site – ignoring any query strings and fragments as well as protocol (http vs https) and the presence or not of ‘www’.

Example Simple Match: http://www.truconversion.com/pages

MATCH http://www.truconversion.com/pages/
NO MATCH http://www.truconversion.com/pages/subpage
NO MATCH http://www.example.com/pages/
MATCH http://www.truconversion.com/pages/?x=1
MATCH http://www.truconversion.com/pages/?x=1&y=1
MATCH http://www.truconversion.com/pages/?x=1#2
MATCH https://www.truconversion.com/pages/
MATCH http://truconversion.com/pages/
MATCH https://truconversion.com/pages/

 

Example Simple Match: http://www.truconversion.com/pages/?x=1

In “Simple Match” this will remove the querry parameter while martching this above URL.

MATCH http://www.truconversion.com/pages/
NO MATCH http://www.truconversion.com/pages/?x=1
Note:
While matching URL “http://www.truconversion.com/pages/?x=1” having querry parameter under “Simple Match” pattern, this will remove the querry parameter from the URL. So this URL is best to add with “Exact Match” and “Contains”.

 

2. Exact Match:

Targets a specific URL which can include a query string and fragment.

Example Exact Match: http://www.truconversion.com/pages/?x=1

NO MATCH http://www.truconversion.com/pages/
NO MATCH http://www.example.com/pages/
NO MATCH http://www.truconversion.com/pages/subpage
MATCH http://www.truconversion.com/pages/?x=1
NO MATCH http://www.truconversion.com/pages/?x=1&y=1
NO MATCH http://www.truconversion.com/pages/?x=1#2

 

3. Starts With:

Target all pages which URL start in the entered text.

Example Starts With: http://www.truconversion.com/pages/

MATCH http://www.truconversion.com/pages/
MATCH http://www.truconversion.com/pages/subpage
MATCH http://www.truconversion.com/pages/?x=1
MATCH http://www.truconversion.com/pages/?x=1&y=1
MATCH http://www.truconversion.com/pages/?x=1#2
NO MATCH http://www.example.com/pages/
Note:
In Session Recordings: “Starts With” option is best when user wants to record complete website. For example, User has website “www.truconversion.com” and wants to record complete pages of his website in one campaign. Then use “http://www.truconversion.com” with “Starts With” URL pattern, this way all the visitor activities will be recorded by the TruConversion.

 

4. Ends With:

Target all pages which URL ends in the entered text.

Example Ends With: pages/

MATCH http://www.truconversion.com/pages/
NO MATCH http://www.truconversion.com/pages/subpage
NO MATCH http://www.truconversion.com/pages/?x=1
NO MATCH http://www.truconversion.com/pages/?x=1&y=1
NO MATCH http://www.truconversion.com.com/pages/?x=1#2

 

5. Contains:

Target all pages which contain the entered text.

Example Contains: /blog/

NO MATCH http://www.truconversion.com.com/pages/
NO MATCH http://www.truconversion.com.com/pages/subpage
MATCH http://www.truconversion.com.com/pages/blog
MATCH http://www.truconversion.com.com/pages/blog/article
MATCH http://www.truconversion.com.com/blog/catagory
Note:
In Session Recordings: “Contains” option is the best If you want to follow your visitors to other pages in the recordings. For example, User has website “www.truconversion.com” and wants to record complete journey of his visitor. Then use “truconversion.com/” with “Contains” URL pattern, this will record your visitors movements for all the pages on your site as long as they contain “/” in the url.

 

6. Regular Expression:

A regular expression (regex or regexp for short) is a special text string for describing a search pattern.

It is unlimited what a regular expression can include and/or exclude. Here we will be listing the most popular user-requested examples:

Examples Wildcard: (where * can be anything)
1: www.truconversion.com/pages/*
Text: ^(http|https):\/\/www.truconversion.com\/pages\/.*$

2: www.truconversion.com/pages/*/article/
Text:^(http|https):\/\/www.truconversion.com\/pages\/[^\/]+\/article\/$

3: www.truconversion.com/user//profile/ (numeric user_id)
Text:^(http|https):\/\/www.truconversion.com\/user\/[0-9]+\/profile\/$

Wildcard excluding a certain pattern:
Target all pages which match the pattern but do not include the word “article” or “post”:

www.truconversion.com/pages/*/subpage/
Text:^((?!\/somepage|\/someotherpage).)*$

Excluding certain words or patterns in a URL:

1.Target all pages which do not include “/somepage” and “/someotherpage”
Text:^((?!\/somepage|\/someotherpage).)*$

1.Target pages which include the word “page” and do not include “somepage”
Text:(?=.*page.*)(?!.*otherpage).*

Multiple pages which don’t follow any pattern:
Target these three pages:
www.example.com/pages/article-one/details/
www.example.com/pages/some-random-word/details/
www.example.com/pages/another-post/details/

Text:^(http|https):\/\/www.example.com\/pages\/(article-one|some-random-word|another-post)\/details\/$

 

7. JavaScript Triggers:

JavaScript trigger enables you to activate any of TruConversion feature at a specified moment during visitor session. For now this feature is available for funnel and will be available soon in others tools.

Below is the JavaScript Trigger Code

    tcjs(‘trigger’,’cf’, ‘unique-trigger-name’);

Using JavaScript Trigger Code Through Google Tag Manager
If you are using Google Tag Manager to add our JavaScript trigger then use this code:

    <script type=”text/javascript”>tcjs(‘trigger’, ‘cf’, ‘unique-name-here’);</script>

Just replace “unique-trigger-name” with the trigger name you have created in Page URL and add this trigger code to your website manually or with Google Tag Manager. Whenever this code is triggered by visitor your funnel step is marked as complete.
For more details and examples, please visit our Using JavaScript Triggers article.

Note: This code must be added after the TruConversion Tracking Code. If it is added before, a JavaScript error will occur.