"Page view" goal
This type of goal lets you track:
- Traffic to a specific page or multiple pages.
- Outbound clicks.
- File downloads.
Tip
Some users might complete the goal somewhere other than on the site, such as by making a phone call. To count these users, set up sending call tracker data to Yandex Metrica. Then you can add calls to Yandex Metrica reports and also use a special group of reports.
How to create a "Page view" goal
- In Yandex Metrica, select Goals from the left menu.
- Click Add goal.
- In the Name field, enter a name for the goal to create.
- Select the Page view goal type.
- Specify the desired condition. You can add up to 10 conditions.
- Click Add goal. The created goal will appear in the list of goals. Yandex.Metrica will start collecting statistics on it within a few minutes.
- Check whether the goal is working correctly.
Conditions for tracking a goal
There are several types of conditions available when creating a goal. Conditions are combined with the OR operator, so the goal is considered completed if at least one of the set conditions is met.
Criterion |
Description |
url: matches |
If you select the full address in the settings, the tag will track sessions where the page address is identical, including the protocol ( If you select the path to the page in the settings, the tag will track sessions with matches between the domain name of the tag and the domain name on which the specified page is located. Note that the page's path that comes after the slash ExampleURL matches:
The goal will not trigger for the URL:
In both cases, if a user lands on a page where the tag is installed, and the page URL completely matches the one specified in the settings, the tag will count this session. |
url: contains |
Specify part of a URL. Use this option if there are multiple target pages and they can be combined with a single condition. Specify as much of the URL as possible so the goal is only completed on the desired pages. ExampleIf the condition is |
url: begins with... |
Only the first part of the URL is specified. Use this condition if you want to track views in subdirectories. ExampleIf the condition is |
url: regular expression |
Used for tracking URLs that match a custom pattern |
When handling the condition, such symbols as ?
, #
, &
, and the dot (.
) are removed from the end of the URL. For example, the URLs http://example.com/?
, http://example.com/#
, and http://example.com/?var=1&
will be compared to http://example.com/
, http://example.com/
, and http://example.com/?var=1
, respectively. To add these symbols, except the dot, to the URL, use the url: regular expression condition.
To avoid accidental goal triggers due to overlaps with similar URLs on the site, don't use conditions that are too short. For example, if the goal condition specifies a URL containing cart
and the site's domain name is bestcartoons.ru
, the goal is achieved when a user views any page of the site.
To trigger the goal for pageviews on pages with a +
symbol in their URL, specify %2B
in the template instead of +
.
Example
Restrictions
- A maximum of 200 goals can be set for each tag.
- The service registers a user reaching the same goal on the same counter no more than once per second.
- During a single user session, the service can register up to 1000 offline conversions and 400 online conversions created for the tag.
- If you edit the tag or a goal, all the previously collected information does not change.
- If you delete a goal, information collected for it is no longer available in reports.
Examples
Tracking outbound clicks
The tag owner's site has the page
http://example.com/page1/
with a link to the external resourcehttp://external-example.com/
.
- Set the type of condition to "url: contains".
- Specify the condition as
https://external-example.com
.Tracking file downloads
- Set the type of condition to "url: contains".
- Enter the full or partial path to the file (or its name) on your site as the condition. For example,
https://example.com/files/name.pdf
orname.pdf
. If you specify a name as the condition, make sure it doesn’t overlap with other file or page names on the website.
Learn more
- Track clicks on an email address
- Track click on phone number
- How to create a report for a goal
- Revenue by goal
Useful links |
Online training |