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." 

When creating conversion goals, you can use the following URLs. 

For a specific course, you can use the course registration URL with /thank-you/ on the end of it. For example:

Or, if you want the goal to work for all course registrations, you can use this expression:


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/), four 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

4. member-cohort:created - fired when a member creates a new private cohort

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. 

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 the heading area 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?