Under the “When & Where” step of the campaign builder, there is an option to add rules to limit which page(s) of your website the campaign should display. If you do not add any display rules, the campaign will show on every page of your site. There are currently four different optional rules available:
URL Contains
This rule simply checks if the URL viewed by the user contains the value provided.
Example:
URL Contains: products
Matches |
|
https://getlytics.com/products/customer-data-platform |
|
https://getlytics.com/?referral=products |
Simple Match
This rule matches the domain and path portion of a URL, this should not include the protocol (http:// or https://) or the query params (values after a ? in the URL).
Example:
Simple Match: getlytics.com
Matches |
Does not Match |
https://getlytics.com?utm_variable=value |
https://getlytics.com/products |
https://getlytics.com |
https://www.getlytics.com/ |
Exact Match
This rule matches a full URL exactly, including query params and protocol. This is a good rule to employ if you have a single page you would like the URL to display on with no url variations.
Example:
Exact Match: https://getlytics.com/blog
Matches |
Does not Match |
https://getlytics.com/blog |
https://getlytics.com/blog?utm_variable=referral |
https://www.getlytics.com/blog |
|
http://getlytics.com/blog |
Regular Expression
This checks a JavaScript regular expressions against the URL. It can be used for complex URL matching that may not be covered by any of the previous rules.
Example:
Regular Expression: ^https:\/\/getlytics\.com(.+?)\?(.*?)my_utm=required
Matches |
Does not Match |
https://getlytics.com/?my_utm=required |
https://getlytics.com/blog/post/welcome |
https://getlytics.com/integrations?my_utm=required |
http://getlytics.com/?my_utm=required |
https://getlytics.com/blog/post/welcome?my_utm=required |
After entering a value for a rule click the “Add rule” button. You may add multiple rules to a single campaign. Rules do not overwrite or conflict with existing rules. For example, if I have the two following rules in your campaign:
URL Contains: products
URL Contains: personalization
Your campaign would display on all of the following URLs:
Matches |
|
https://getlytics.com/products/personalization |
|
https://getlytics.com/products/content-affinity |
|
https://getlytics.com/blog/post/introduction-to-personalization |
You might want to exclude a specific URL from a campaign, you can do this using a negative lookahead :
^https:\/\/www\.getlytics\.com\/(?!blog).*$
This would exclude “https://getlytics.com/blog” from your campaign.
Comments
0 comments
Please sign in to leave a comment.