Setting up goals and conversions

Count sign-ups, purchases, downloads or button clicks.

Goal types

  • Pageview: converts when a visitor reaches a page, such as /thank-you after checkout.
  • Scroll percentage: converts when a visitor scrolls to a set percentage of a page, for example 75% of an article.
  • Scroll until element: converts when an element matching a CSS selector comes into view, for example #pricing or footer.
  • Click on element: converts when a visitor clicks an element matching a CSS selector, for example .buy-button or #download.
  • Webhook: your server sends a POST request to a private URL to record a conversion, which is ideal for payments or back-end events.
  • Custom: you trigger the conversion yourself with a line of JavaScript.

Create a goal

  1. Open your website's dashboard and click Goals.
  2. Choose the option to create a new goal.
  3. Give it a clear name, for example "Newsletter sign-up".
  4. Pick the goal type and fill in its details: the page path, the scroll percentage, or the CSS selector.
  5. Optionally, set a conversion value, for example 49.90 for a product sale.
  6. Save. Conversions will start appearing as soon as visitors complete the action.

Custom goals with JavaScript

When you create a custom goal, the dashboard shows you the exact code to use. It looks like this:

my_analytics.goal('my-goal');

For example, on a button:

<button type="button" onclick="my_analytics.goal('my-goal')">Click me</button>

Replace my-goal with your goal's key, and always copy the snippet shown in your dashboard.

Webhook goals

  1. Create a goal and choose Webhook.
  2. Edit the goal to see its private webhook URL.
  3. Send a POST request to that URL from your server. You can send JSON or form data, or an empty POST. To record a specific amount, send it as a value:
    {"value": 49.90}

Webhook conversions record only the time and the value. They aren't linked to visitors or pages, so visitor and page filters don't apply to them.

Reading your results

  • The goals chart shows conversion counts as a line and total goal values as bars.
  • Hover over a goal in the list to see its total value.
  • Set your website's currency in its settings so values display correctly. Changing the currency doesn't convert amounts you've already recorded.

Tips

  • Changing a goal's value only affects new conversions, not past ones.
  • How many goals you can create depends on your plan.
  • More details are in the Goals reference.

Need a hand?

Email support@analytix66.com or browse the help center.