Our page targeting options allow you to activate specific Beeketing Analytics features on specific pages of your site. To do this, you can either use one of our 6 page URL targeting options or use a JavaScript trigger, only available on Plus and Business plans.


URL Targeting

Page targeting options can be found for the Feedback Tools when you select On pages I specify.


To better understand how URL targeting works, it is good to also understand what components form a URL:

What components form a URL

Each URL match you enter can be one of five types:

  • 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'.
  • Exact Match: Targets a specific URL, including the protocol, which can include a query string and fragment.
  • Starts With: Target all pages that have a URL, including the protocol, which starts with the entered text;
  • Ends With: Target all pages that have a URL which ends in the entered text;
  • Contains: Target all pages which contain the entered text;
  • Regular Expression: A regular expression, regex or regexp for short, is a special text string for describing a search pattern.


Let's explore in more detail the different options and how they would work.

Note

All URL targeting is case sensitive.


Simple Match

This is the default match type and is intended to be used to target a page on your site. The match will be correct if the URL path your visitor is on, matches the URL path you specify.

Note

Query strings and fragments are ignored if entered in the field


Example: Simple Match - http://www.x.com/pages/


Result
Example URL
MATCHhttp://www.x.com/pages/
NO MATCHhttp://www.x.com/pages/subpage
MATCHhttp://www.x.com/pages/?x=1
MATCHhttp://www.x.com/pages/?x=1&y=1
MATCHhttp://www.x.com/pages/?x=1#2
MATCHhttp://www.x.com/pages/?x=1
MATCH
https://www.x.com/pages/
MATCH
http://x.com/pages/
MATCH
https://x.com/pages/



Exact Match

The match will be correct if the URL path, query string and fragment your visitor is on match EXACTLY the ones you specify.

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


Result
Example URL
NO MATCH
http://www.x.com/pages/
NO MATCHhttp://www.x.com/pages/subpage
MATCHhttp://www.x.com/pages/?x=1
NO MATCH
http://www.x.com/pages/?x=1&y=1
NO MATCH
http://www.x.com/pages/?x=1#2
NO MATCH
http://www.x.com/pages/?x=1



Starts With

The match will be correct if the URL your visitor is on, starts exactly as you specify it, including the protocol.

Example: Starts with - http://www.x.com/pages/


Result
Example URL
MATCH
http://www.x.com/pages/
MATCH
http://www.x.com/pages/subpage
MATCHhttp://www.x.com/pages/?x=1
MATCH
http://www.x.com/pages/?x=1&y=1
MATCH
http://www.x.com/pages/?x=1#2
NO MATCH
http://www.x.com/pages/?x=1



Ends With

The match will be correct if the URL your visitor is on, ends exactly as you specify it.

Example: Ends with - pages/


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



Contains

The match will be correct if the URL your visitor is on, contains the text you specified.

Example: Contains - ?x=1


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



Regular Expressions

For a detailed explanation of Regular Expressions and usage examples, read our knowledge base article: Using Regular Expressions.


JavaScript Triggers

JavaScript triggers is a feature available for users on PLUS and BUSINESS plans. Triggers allow you to activate specific Hotjar features using a very simple snippet of code. For more details and examples, please read our knowledge base article: Using JavaScript Triggers.