With Advanced Analytics (available on all paid plans), you can track custom events with our analytics system. You can send events from our web-app, your Umso website or any other page or subdomain on your domain.
This article is about Umso Analytics. If you want to track events with other third-party software, you need to use custom code.
For security reasons, you can only send events from the same domain, or a subdomain of your Umso website. If your website is on example.com, you can send events from example.com, www.example.com, app.example.com, campaign.example.com, .... However you can't send events from examplecorp.com or example.io
Setup
First you need to include the following script on the page(s) you want to send events from. Make sure to replace the domain with the domain of your Umso website. If your website is at www.example.com, your script URL would look like this:
<!-- The script url with a placeholder -->
<script src="https://[YOUR_DOMAIN_HERE]/s/interactive.js"></script>
<!-- The script url if your domain was www.example.com -->
<script src="https://www.example.com/s/interactive.js"></script>
Sending Events
Once you have included the above script tag in your html file, you can then send events to Umso Analytics with a single line of JavaScript code:
Umso.track('your event name')
Examples
Here are some examples how you can track in html:
<!-- track a button click -->
<button onclick="Umso.track('button clicked')">Click Me!</button>
<!-- track a form submission -->
<form onsubmit="Umso.track('form submitted')">
<input type="text">
</form>
... and in JavaScript ...
// track a page load event
window.addEventListener('load', (event) => {
Umso.track('page loaded')
});