This guide describes the conditions you can use to qualify which pages a user has visited or what source they have visited from.
Where conditions are:
The structure of this condition is:
- a condition key
- a matching operator
- a value
The value condition key specifies what absolute or partial URL, query parameter, or referrer to match against.
The full URL as shown in the address bar, including all query parameters. For example, the URL value of
https://www.example.com/landing-page?utm_campaign=demo&q=queryis that full value.
The segment of the URL following the domain. For example, the path of
You may select from of the five standard UTM parameters:
- Campaign Name (
- Campaign Source (
- Campaign Medium (
- Campaign Term (
- Campaign Content (
For example, the Campaign Name of
The value of specific query paramter key. For example, the
qquery parameter of
An absolute or partial address of the URL from which the user was directed to your site. Most often, this means a user visited your site when clicking on a hyperlink from another site; the referrer is the page the user was on when they clicked on that hyperlink. Domain, path, and query strings, including UTM parameters, may be present in the referrer value, depending on the referrer policy set by the referrer.
For example, if a user came across a link to
https://example.com/landing-page?utm_campaign=demo&q=queryfrom a Google search results, the referrer value would be
https://www.google.comno matter what the full URL of the Google search results page was, due to the referrer policy set by google.com.
A custom key-value pair that has been passed along with a
page()event call. For example, your application could associate the
categoryto which a viewed blog post belongs. You could then use this condition key to refine the page view rule rules to only page views with a
categoryattribute of specified values.
You can select following operators:
- does not equal
- starts with
- ends with
- matches, for matching to a Regex expression
The value you want to match the value condition key against. Ensure that your value makes sense in the context of the condition and matchers you've chosen. For example, consider if exactly matching a whole URL is necessary, or if you can be more flexible to match a fragment (
contains) of a URL.
You can use a value of
*as a wildcard matcher. This can be useful to construct an audience defining all visitors, as in the screenshot at the top of this page.