Custom event tracking

PrivateAnalytix allows you to track custom goals. This is a useful feature if you'd like to track page visits, button clicks, eCommerce sales etc.

To track a custom event, you can do the following:

1. Ensure that the PA pixel is installed

Make sure that your PrivateAnalytix pixel code has been properly installed on all page headers (between the <head> and </head> tag. You can find out how to do it here.

2. Install an event code

Ensure that in addition to the PrivateAnalytix pixel code, you add the following code template to your header as well.

<script>
    window.addEventListener('DOMContentLoaded', function () {
        pa.track({name: 'Payment', value: 5, unit: 'USD'})
    });
</script>

Make sure to replace the name values with those that suit your needs. The code at the top will return the following events.

Note

If you would like to get reminded of various event code possibilities. Tap the < event code> button in your "Events" section (see below)

Last updated