Goals
A goal tracks actions not covered by existing analytics, like button clicks, downloads, or specific page views such as a thank-you page after checkout.
Pageview
The pageview goal is easy to set up. It converts when a visitor reaches a specified page.
For example, a 'thank you' page after a conversion (newsletter, purchase, form submission).
Scroll
The scroll goal converts when a visitor reaches a configured scroll percentage on a specified page.
For example, track when a visitor reads 75% of an article, pricing page, or landing page.
Custom
Custom goals require extra code, specified when you create a new goal from the dashboard.
Use custom goals to track specific events not covered by pageview goals.
Examples of custom goals:
- Tracking clicks on external links
- Tracking advanced form submissions
- Tracking clicks on specific page parts
Example of a JavaScript snippet for goal tracking:
odexx_analytics.goal('my-goal');
When this code triggers, the goal conversion is recorded.
Example of code integrated into a button to trigger the Goal event:
<button type="button" onclick="odexx_analytics.goal('my-goal')">Click me</button>