Skip to main content
Event Tracking

How to set up and use the Monsido Event Tracking

Updated over a week ago

This article gives information on how to set up and use the Monsido Event Tracking feature for statistics.

Article Navigation


Introduction

This section gives instructions on how to set up and use Event Tracking in the Statistics feature.

Track visitor interactions on your website with the Event Tracking option. This lets you add event tracking to any clickable element on your web pages, for example, buttons, links, drop-down menus, and widgets. In the Monsido UI, you can see how many times visitors click on a tracked element.

Note: One Click = One Event. For example, if the same user interacts with the item 10 times, it is counted as 10 events.


Prerequisites

To track events on your website, the following requirements must be fulfilled:

  1. The Monsido script has to be present on your website.

    For more information, see the user guide article:

  2. The Statistics feature has to be enabled. The instructions are in the Setup section of this document.
    For more information, see the user guide article:

  3. The web page element that you want to track interactions on must contain the following code snippet:

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


Define Categories, Actions, and Event Names

To classify an event: assign a category, action, and name.

For example, you may have Contact Us buttons in 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 the Contact Us button on the Home page.

The code to add to the "Contact Us" button from this example looks like this:

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

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

  • Category: Contact

  • Action: Contact Us button

  • Event: Click the Contact Us button on the Privacy Policy page.

This is how the above configuration appears in the Monsido UI when the event data starts to come in:

Example of some Event data.


Setup Instructions

  1. Make sure your website and the Monsido configuration both meet the prerequisites.

  2. Locate a clickable element on your website that you wish to add event tracking to. In this example, we will use a "Book a demo" button located in the website header.

    Example of how the button might look.

  3. Open the CMS (website builder software) and find the HTML code for the "Book a demo" button. In this example, 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 as given above 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. Specify a Category, Action, and Event that you want this event to be tracked as. These will show up inside the Monsido UI and help you understand the data.

    In our example below, we set the Category to "Conversion", the Action to "Book a demo", and the Event to "Website header button clicked". The 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.


View Events Data

  1. To view the Events data, log into Monsido and navigate to the Statistics module > Content > Events. There you can see all the events data that are tracked on your website. Be aware that in some cases it can take up to 24 hours before tracked data is displayed in Monsido.

    The number in the Events column indicates how many times the selected element has been clicked.


Instructions

This section gives instructions on how to navigate to Event Tracking in the Statistics module.

  1. Navigate to the dashboard for the domain.

    Image showing the full dashboard view.
  2. Locate the Statistics section and click to open it, or click Statistics (the broken pie chart icon) on the page menu bar. The Statistics landing page opens.

  3. From the menu on the left, click Content. The menu expands.

    The location of the Content button, third item down in the left-hand menu.
  4. From the expanded menu, click Events.

    Location of the Events button, sixth item down in the expanded Content menu.

    The Events page opens by default to the Categories view.


Event Categories

From the options on the top right side of the window, click Categories.

The location of the Categories button, on the menu for the pane, in line with the page name "Events". the page name.
  • The Categories view is a table with the following headers:

    • Category: User-assigned category. This can be, for example: Contact.

    • Action: This is the element that is assigned to be tracked, for example, a Contact Us button.

    • Events: This column tracks and shows the number of times that users interact with the element, for example clicks on the Contact Us button.

    Note: One Click = One Event. For example, if the same user interacts with the item 10 times, it counts as 10 events.


Event Actions

From the options on the top right side of the window, click Actions.

Actions button, on the upper right-hand side of the Events window.
  • The Actions view sorts the chart per tracked item, for example a link or button. The Actions view table has the following headers:

    • Action: This is the element that is assigned to be tracked, for example, a Contact Us button.

    • Name: This category is defined by the user. It usually defines the element further if needed.

    • Events: This column tracks and shows the number of times that users interact with the element, for example the number of clicks on the Contact Us button.

    Note: One Click = One Event. For example, if the same user interacts with the item 10 times, it is counted as 10 events.


Event Export

This section gives information on how to export events statistics.

  1. Click Export from the page functions menu on the top right side of the page.

    The location of the Export button, in the page menu options under the page header row.
  2. A dialog opens. Select the export name from the list.

  3. Monsido sends the export to the email on the account.


Event Names

From the options on the top right side of the window, click Names.

Names button, on the upper right-hand side of the Events window.
  • The table has the following headers:

    • Name: This category is defined by the user. It usually defines the element further if needed.

    • Action: This is the element that is assigned to be tracked, for example, a Contact Us button.

    • Events: This column tracks and shows the number of times that users interact with the element, for example number of clicks on the Contact Us button.

    Note: One Click = One Event. For example, if the same user interacts with the item 10 times, it counts as 10 events.


How to set up onclick Events with Google Tag Manager

The onclick event executes a certain functionality when, for example, the user clicks on any button.
This event lets website owners monitor and track the number of clicks on each button or link, and use this data to improve the browsing experience for website visitors.

  1. Make sure that the Monsido script is already deployed on Tag Manager, so that the statistics are ready to collect data.
    For more information, see the user guide chapter:

  2. Click Tags, from the menu on the left.

  3. Click New, on the top right of the page.

  4. Create a new tag with the type should be Custom HTML.
    Note: The event is set with Javascript.

  5. Rename the tag. That option is on the top left corner of the window.

  6. Add the event onclick script.

    1<a class="b-btn-t" href="#">Click me</a> 2<script type="text/javascript"> 3function trackEvent() { 4 return window.monsido_functions.trackEvent('Category', 'Action', 'Event', 1); 5} 6document.querySelector('a.b-btn-t').addEventListener("click", trackEvent); 7</script>

    Note: Make sure to adjust the script, since it is set to trigger on a specific button.​

  7. Select the tag to be triggered on one or several pages.
    Note: The trigger configuration might need to be adjusted.

  8. Save the changes.

  9. Publish to the website.

For more information, see the Google document:


Additional Resources

For more information, see the following User Guide articles:

See also these pages on the Monsido website for more useful information:

For definitions and explanations of acronyms and abbreviations used in the Monsido User Guide, see:

For further assistance, contact the Monsido support team at support@monsido.com or use the Monsido chat and help features inside the application.

Image of the toolbar with the Help Center buttons highlighted.

Did this answer your question?