How do I use Custom Events?

Nick Sfikas

Last Update há 2 anos

Events can be tracked using the pa.track() JavaScript function.

The pa.track() function accepts an object as the argument. The object must contain a key named name.

Additionally, value and unit keys can be included to be tracked.

You can read more about the Events, by going to the Events on the Stats page of a website, and clicking on the Events code button located in the top-right corner of the table:

Here is a quick and easy example of a button-clicked event:

<button onclick="pa.track({name: 'Button clicked!'})">Button</button>

Was this article helpful?

0 out of 1 liked this article

Still need help? Message Us