This type of goal lets you track events on a site (such as button clicks and form submissions) that occur without the page URL changing. If the URL changes, use the Page view goal.
When you create a goal, you set its ID. When a goal is completed, the reachGoal method is called, and the specified ID is passed to it.
This type of goal can be used on Turbo pages.
Use IDs that aren't contained in in page URLs for the website. Otherwise, statistics also include session information for pages that contain the goal name in the URL.
The following symbols are not allowed in goal IDs: /, &, #, ?, =. If you want to add a plus sign to the ID, enter %2B in place of the + character.
Use the reachGoal method on site pages.
XXXXXXis the tag ID.
TARGET_NAMEis the goal ID.
... <form action=""> ... <input type="button" onclick="ym(XXXXXX, 'reachGoal', 'TARGET_NAME'); return true;" value="Order" /> </form> ...
- In Yandex.Metrica, go to Settings, open the Goals tab, and click Add goal.
- In the Name field, enter a name for the goal to create.
- Specify the goal ID.
- Click Add goal and save changes.
- Check whether the goal is working correctly.
Yandex.Metrica starts collecting stats just a few minutes after the settings are saved.
Goal cost (value)
When you transmit a goal achievement, you can assign a value to the conversion. This helps you take the goal's commercial viability into account. You can use a monetary value or symbolic units (1 — low, 10 — high). For example, you can set the average order amount for a service or product as the goal value.
- A maximum of 200 goals can be set for each tag.
- The service registers a user completing the same goal on the same tag no more than once per second.
- During a single user session, the service can register up to 400 completions of all the goals created for a tag.
- If you edit a tag or goal, previously collected information doesn't change.
- If you delete a goal, information collected for it is no longer available in reports.