Setup your WooCommerce affiliate program with Affilae
Well done, you’ve created your new affiliate program!
Now you need to setup tracking scripts to check if clicks and sales tracking works fine.
To setup the tracking scripts for your WooCommerce affiliate program, follow these steps:
➜ If you are using redirect tracking, go to step 2.
① Track clicks from your partners
This script must be placed on all pages in the<body>
tag.
➜ Caution! The script below is an example, you must copy-paste the right code in your account: “config” menu at the bottom of the page.
② Track sales
When you want to track sales for affiliates in WooCommerce, you need to add a conversion tag to your thank you page that passes through the ORDER ID and SALE AMOUNT tax excluded.
- First, go to your WordPress admin and access to Appearance and Editor.
- Then, click the “Theme Functions (functions.php)” file.
- And paste in the following conversion code at the top of the file, after the <?php line:
➜ You only need to replace the value {{ YOUR.KEY }} with the key of the conversion code found in your Affilae account: go to the “config” menu and then click on the green button “conversion code”.
- To finish, save “functions.php” file. Tracking should be ok for tests.
Now, you can test tracking and check if clicks and conversions work well: Test tracking.
Need help? Contact us!