All Collections
Archive
How to set up Event tracking
How to set up Event tracking

Track visitor interactions on your website with Monsido Events

Updated over a week ago

The contents of this article have been moved to the following documents:


Monsido Events is an event tracking feature in the Statistics module that allows you to track visitor interactions on your website. You can add event tracking to any clickable element on your web pages, for example buttons, links, dropdowns and widgets. In the Monsido UI, you can see how many times a tracked element has been clicked by visitors.

Requirements

In order to track events on your website, the following requirements must be fulfilled:

  1. The Monsido script must be present on your website and the Statistics feature enabled. Read more about adding the Monsido script to a website.

  2. Any web page element you wish to track interactions on must contain the following code snippet:

onclick="window.monsido_functions.trackEvent('Category', 'Action', 'Event', 1);"

Find detailed guides and examples on how to set up event tracking later in this article.

Defining categories, actions and names

When adding event tracking to an element on your website, you can classify events by assigning them a category, action and name.

For example, you may have "Contact Us" buttons various places on your website and would like to track how many people actually click them. For the "Contact Us" button on the Home page, you could classify it as follows:

  • Category: Contact

  • Action: Contact Us button

  • Event: Click Contact Us button on Home page

The code to be added to the "Contact Us" button would look like this:

onclick="window.monsido_functions.trackEvent('Contact', 'Contact Us button', 'Click Contact Us button on Home page', 1);"

If you have the same button on a different page, for example your Privacy Policy page, you can then use the following classification for that element:

  • Category: Contact

  • Action: Contact Us button

  • Event: Click Contact Us button on Privacy Policy page

This is how the above configuration would appear in the Monsido UI once event data starts coming in:

The above is just one example of how to use categories, actions and events. They can be used to represent any sort of classification and may be adapted to suit your specific needs.

Video Guide: How to set up event tracking

Duration: 5 minutes

Written Guide: How to set up event tracking

  1. Make sure your website and Monsido configuration meet the basic requirements for using event tracking.

  2. Locate a clickable element on your website that you wish to add event tracking to. In this example, let's say it's a "Book a demo" button located in your website header.

  3. Open up your CMS (website builder software) and find the HTML code for the "Book a demo" button. Let's imagine the code looks like this:

    <a href="https://example.com/demo">
    <button class="header-btn" type="button">
    Book a demo
    </button> </a>

  4. Copy the code snippet provided above in the Requirements section of this article and paste it inside the <button> element of your code. It should look like this:

    <a href="https://example.com/demo">
    <button class="header-btn" type="button"
    onclick="window.monsido_functions.trackEvent
    ('Category', 'Action', 'Event', 1);">
    Book a demo
    </button> </a>

  5. You can now specify a Category, Action and Event that you want this event tracked as. These will show inside the Monsido UI and help you make sense of the data. In our example, we'll set Category as "Conversion", Action as "Book a demo", and the Event as "Website header button clicked". Your final code should look like this:

    <a href="https://example.com/demo">
    <button class="header-btn" type="button"
    onclick="window.monsido_functions.trackEvent
    ('Conversion', 'Book a demo', 'Website header button clicked', 1);">
    Book a demo
    </button> </a>

  6. Publish your website. Monsido is now tracking clicks on the "Book a demo" button.

  7. To view Events data, log into Monsido and head to the Statistics module > Content > Events. There you can see all the events data that has been tracked on your website. Be aware that in some cases it can take up to 24 hours before tracked data is being displayed in Monsido.
    โ€‹
    The number in the "Events" column indicates how many times a particular element has been clicked.
    โ€‹


Additional Information

For more information, see:

Did this answer your question?