How to Install TWIPLA on any HTML-website

Seamlessly Integrate With Almost Any Website Platform

How to integrate an event tag within your HTML website

Once you have generated your new event tag, you need to integrate it within your website, so that the application can track the firing of this event. Each created tag must be added within each individual element that you want to track.

It is pretty simple and there are various ways on how to do this:

 

Edit your HTML source-code and add the Event Tag to your desired elements.

You can add the tag our app creates for your event, either as a JS snippet or directly on the element, as per the tutorial below.

Here is an example for a button inHTML and how it should look like so that the click on that button is tracked as an event:

<button id="important-btn">Click me!</button>

Option A: JS snippet

<script>
document.getElementById("important-btn")
  .addEventListener("click", function(){
    va("send", "event", "example-category", "btn-click", "Important Button")
  });
</script>

Option B: directly on the element

<h2 onclick="va('send', 'event', 'example-category', 'btn-click', 'important', 123);">Important button</h2>

 

Both options are semantically correct and do the same thing in the ideal case.

However, Option A allows for more flexibility. For example you could add a "visa-track" class to multiple elements and call the va method in a more dynamic manner by relying on JS capabilities.

The limitation with Option B is that it might be overridden by some other JS code that is loaded after the DOM is rendered ( element.onclick = function(){ ... } ), thus causing our code never to be called.

In comparison, Option A allows an unlimited number of event listeners to be added (as long as the memory on the user agent device can withstand it).

Support for Installation and Using TWIPLA on any HTML Website

If you encounter any issues during installation, you can contact us via the website contact form or through the chat bubble available on our website or in-app at app.visitor-analytics.io. We are here to assist you and ensure a smooth experience with our plugin.