PrivateAnalytix Help
  • Get Started
    • Welcome
    • Register an account
    • Add your web site
    • Add the script to your website
  • Website Settings
    • Opt out and exclude yourself from the analytics
    • Set reports to be sent via email
  • Goal Conversions
    • Custom event tracking
    • 404 error page tracking
  • API for Developers
    • Statistics API
    • Websites API
    • Account API
Powered by GitBook
On this page
  • 1. Ensure that the PA pixel is installed
  • 2. Install an event code
  1. Goal Conversions

Custom event tracking

PreviousSet reports to be sent via emailNext404 error page tracking

Last updated 3 years ago

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)

Add a custom event: PrivateAnalytix