How to track custom events

The simple script is useful when the only event you have to push are the pageviews. What if you need to push different type of events? For this necessity there is an additional part that you can add to the simple script where you can specify the events you want to push.

<!--CUSTOM EVENTS-->
<script>
    publytics('EventName', {props: {prop1: 'content1', prop2: 'content2'}});

    //OR

    publytics('EventName');
</script>

Here you just need to replace 'EventName' with the name of your own events and (if you have them) 'content1', content2' etc. with the name of the properties.