Goals on Turbo pages created in Yandex Webmaster
Goals for an informational site
To track the users' interaction with Turbo page elements, use a “JavaScript event” goal.
- Add the turbo:goal element to an RSS feed:
... <turbo:goal type="yandex" turbo-goal-id="goal-link" name="TARGET" id="12345" /> <turbo:content> <![CDATA[ ... ]]> </turbo:content>
where- name is the goal ID.
- id is the tag number.
- turbo-goal-id is the ID to assign to the Turbo page content
- Add the ID to the content you want to track statistics for as the data-goals attribute value. You can specify multiple comma-separated values, i.e., you can link multiple goals to a single element on a Turbo page.
<turbo:content> <![|||UNTRANSLATED_CONTENT_START|||CDATA[ <p><a href="http://example.com/" data-goals="goal-link,goal-link2">Текст</a></p> ]]> </turbo:content>|||UNTRANSLATED_CONTENT_END|||
- Add the turbo:goal element to an RSS feed:
... <turbo:goal type="yandex" turbo-goal-id="goal-link" name="TARGET" id="12345" /> <turbo:content> <![CDATA[ ... ]]> </turbo:content>
where- name is the goal ID.
- id is the tag number.
- turbo-goal-id is the ID to assign to the Turbo page content
- Add the ID to the content you want to track statistics for as the data-goals attribute value. You can specify multiple comma-separated values, i.e., you can link multiple goals to a single element on a Turbo page.
<turbo:content> <![|||UNTRANSLATED_CONTENT_START|||CDATA[ <p><a href="http://example.com/" data-goals="goal-link,goal-link2">Текст</a></p> ]]> </turbo:content>|||UNTRANSLATED_CONTENT_END|||
- In Yandex Metrica, use the left menu to go to the Goals page and click Add goal.
- In the Name field, enter a name for the goal to create.
- Choose the JavaScript event goal type.
- Specify the goal ID. The Goal code for the site appears under the ID field. Copy the code. You'll need it to configure the reachGoal method on your site.
- 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.
Data will start being transmitted to Yandex Metrica after the robot checks the RSS feed and finds out about the changes.
The created goal can be used in most Yandex Metrica reports. You can also track conversions by goal using the Conversions report.