Home > Set Up Features > Set up Conversion/Commission Tracking in WordPress

Set up Conversion/Commission Tracking in WordPress

Table of Contents
< All Topics

Set up Conversion/Commission Tracking in WordPress

Affiliate marketing success is not just about promoting products but also about tracking your conversions and commission effectively. LinkGenius, a powerful WordPress plugin, allows you to seamlessly track your commissions. In this tutorial, we’ll explain how to set up conversion tracking and guide you through the process step by step.

Enabling Commission Postback

  1. Navigate to LinkGenius Settings: In your WordPress dashboard, go to LinkGenius > Settings > Tracking.
  2. Enable Commission Postback: Check the box for Enable Commission Postback.
  3. Obtain GA4 Measurement ID and API Key: Follow this guide to get your Measurement ID and API secret from Google Analytics (GA4).
  4. Fill in GA4 Details: Input the obtained Measurement ID and API secret into the corresponding fields.
  5. Save Changes: After filling in the details, click Save Changes.
  6. Copy the Postback URL and save it into your affiliate network account (see details below).

Commission Postback URL Format

Upon saving, LinkGenius provides you with the Commission Postback URL. You can save this URL after logging in at your affiliate network. The network then makes a call to this URL whenever there is a sale or lead. The Postback URL follows this format:


Note that {commission} and {reference} are variables passed by your affiliate network, you’ll need to replace these variables with the ones used by your affiliate network.

Affiliate Network Variable Formats

Different affiliate networks use varying formats for commission and reference variables. Here’s a list for some major networks:

  • TradeTracker: {commission}, {reference}
  • ShareASale: !!commission!!, !!afftrack!!
  • Awin: !!!commission!!!, !!!clickRef!!!
  • Impact: {commission}, {subId1}

Adjust your LinkGenius Affiliate Target URLs accordingly to allow the affiliate network to post back the correct reference. To do so you can use the variable {client_id} for the correct get-parameter in your affiliate links. LinkGenius will the automatically replace {client_id} with an unique identifier for the users GA4 Session. Below you find how to do this for some major networks:

  • TraceTracker: add the get parameter r={client_id} to your affiliate links in the Target URL of your LinkGenius links.
  • ShareASale: add the get parameter afftrack={client_id} to your affiliate links in the Target URL of your LinkGenius links.
  • Awin: add the get parameter clickref={clientd_id} to your affiliate links in the Target URL of your LinkGenius links.
  • Impact: add the get parameter subId1={clientd_id} to your affiliate links in the Target URL of your LinkGenius links.

Customizing Commission Logging Event

By default, LinkGenius logs commissions with the event name linkgenius_commission_received. Modify this by adding the get parameter &event=newname to the Commission Postback URL.

Adding Additional Parameters to GA4 Event

Enhance your GA4 event by including additional parameters. Simply add them as get parameters, such as &currency=USD. This allows for more detailed conversion tracking, like identifying the merchant or network involved.

Testing Your Postback URL

You can easily test your Postback URL by simply copying it and pasting it in your browser. You’ll have to make sure to fill in some test data for commission and client_id. You should see the event in Google Analytics under Reports > Realtime > Event count by Event name in a matter of seconds. Additionally you can set the get parameter lg_debug to 1 i.e. add &lg_debug=1 to the Postback URL. This allows you to see what events are send and view the validation messages from Google Analytics.


Besides automatically tracking click on your affiliate links in GA4, LinkGenius also can track your generated commission in GA4. By completing the steps above you’ve successfully set up conversion tracking using LinkGenius. By doing so you’ve gained acces to a wealth of information having your sales and leads integrated with other GA4 data. This allows you to identify links that do not convert, refine your content strategy, and focus your efforts on the links that resonate most with your audience. This optimization process is essential for maximizing the impact of your affiliate marketing initiatives.

Happy affiliate marketing! I hope you may log many commissions!