Tracking sales with Google Analytics

If you offer commissions to affiliates marketing your courses, you can track affiliate sales by integrating your Google Analytics account and setting up conversion goals. 

To add your Google Analytics account to Pathwright....

  1. Go to the Dashboard and open "Account Settings" or just select "Settings" from the main menu. 
  2. Select "Connect other apps" and enter your Google Analytics Tracking ID under "Track with Google Analytics." 

Tracking with Facebook or another pixel code

If the tracking service you are currently using has a pixel JavaScript code that can be embedded to track affiliate sales, you can include that code on your purchase confirmation pages:

  1. Go to the Dashboard and open "Account Settings" or just select "Settings" from the main menu. 
  2. Select "Connect other apps," and then "Add custom code & pixel tracking." 
  3. Paste in your Facebook pixel script under "Inject code into the header."

When a conversion occurs, "/thank-you/" is appended to the URL, which should be tracked by your FB pixel or other tracking code.

New custom events now available

Now in custom integrations (at /manage/school/integrations/custom/), three new custom events are provided for use:

1. transaction - fired when a user pays for a single registration or subscription

2. registration:created - fired when a user registers

3. subscription:created - fired when a user subscribes

Note that when a user registers or subscribes, the transaction event may or may not fire depending on if the user paid. So, it's possible that a registration/subscription will trigger two events. Also, the transaction trigger does not currently include licensing ("create your own group" purchases), but this will be coming soon. 

To set up...

  1. Click “see events examples” in order to view "read-only" event examples.
  2. Once you have the code that you want to fire for each event, copy the HTML and paste it into an editor above, make any edits, and save. 

Note: the legacy section, “inject code or a pixel when someone purchases a course or subscription,” will likely be deprecated in favor of the new custom events. It would be redundant to use both. Once you've started using the custom events, you should clear the final section (and it will disappear from view once cleared and saved).

Legacy editor

If you're still using our legacy scripts, you can continue to edit them. The full embed code goes under "Inject code into the header" and the checkout script goes under the last option, "Inject code or a pixel when someone purchases a course or subscription." 

For scripts that need to access certain values dynamically, we have provided the following placeholders that map to the desired value. 

Here are some examples - not an exhaustive list - of some variables you can use in your conversion tracking code: 

  • Amount paid after a discount is applied: PATHWRIGHT___REGISTER___DISCOUNT___DISCOUNTED_TOTAL 
Did this answer your question?