βš’οΈTracking Script

Follow the instructions on your dashboard to set up and verify your Uppercut tracking installation. The basic setup consists of two steps.

Add tracking script to your website

Add the Uppercut tracking script to the <head/> section of your website. The exact tracking script is displayed to you during your setup, but looks a little bit like this.

<script async src="https://uppercut.co/uc.js" data-uppercut="<your-company-id>"></script>

The job of the tracking script is to track referrals coming from your affiliate's to your website, and placing tracking cookies in the browsers of those referred users.

Dealing with subdomains

If your app sprawl across multiple subdomains (i.e. domain.com and app.domain.com), you can add the data-domains attribute to your tracking script, and we'll make sure tracking works across pages as well.

<script [...] data-domains="domain.com,app.domain.com"></script>

Track signups

When the user signs up for your service – be it for a trial, a free account or even already the full paid experience, you should track the user in the Uppercut system so future charges can be attributed to their respective affiliate.

Typically, this is on a "thank you" page, onboarding page or on first sign in – a page that's only displayed once during the signup. However, it's also possible to send this call multiple times, which will just cause the record to get updated.

<script type="text/javascript">
    window.addEventListener('load', function() {
      Uppercut.signup({
          email: '[email protected]', 
          userId: '1234'
      });
    });
</script>

You can add either the email or the userId as only one of the two are mandatory. However, for data integrity, it is recommended to do both.

The user ID is typically a unique identifier provided by your backend, or an external billing system.

What happens if the user's email changes?

As long as you set the userId, our system will be able to attribute sales to the right user. It is recommended you keep track of the original signup email.

Track sales

Signups do not qualify for any sales-based commissions, yet. To start tracking and paying out commissions, you should consult one of the next guides on tracking sales.

Last updated