WooCommerce Integration

This article shows you how to connect Refersion to WooCommerce, an eCommerce platform available for WordPress.

Shakima avatar
Written by Shakima
Updated over a week ago

WooCommerce is a plugin available for WordPress that allows you to integrate an eCommerce platform into a new or existing WordPress installation.

Please note: Refersion is compatible with all versions of WooCommerce; however WordPress is an open-source platform with hundreds of thousands of additional plugins. Due to this we cannot guarantee compatibility with all existing plugins and we strongly advise running a test order to confirm everything is tracking properly before launching your affiliate program.

If you have subscription products in your store: Refersion's default plugin will NOT tracking recurring subscriptions as conversions. However, if this is something that you want to use Refersion to track and you have developer resources, then you can reach out to us at [email protected] for next steps

Step 1: Download and install the Refersion plugin

From the WordPress Plugins Menu, add the Refersion plugin (or install it directly from this page). Once installed, activate the plugin.

Step 2: Configure the plugin

Next, you must configure the plugin to connect it to your Refersion account. From the WordPress menu, click WooCommerce and select Refersion:

There will be three sections on the Refersion Plugin Setting screen: Configuration, Advanced Settings and Optional Features.

Note: If you originally installed the Refersion plugin prior to November 2021, you may need to update the plugin to the latest version to see all three of these sections.

To get started you’ll need to complete the Configuration section, where you’ll need to enable Refersion tracking and enter the API keys from your Refersion account. You can find these API keys in Refersion by navigating to Account > Settings > Refersion API.

Once you have your API keys handy, you’ll set up your configuration according to the settings below:

  • Refersion tracking enabled? - set to “Yes, send orders to Refersion”

  • Your Refersion public API key - enter the public API key from your Refersion account.

  • Your Refersion secret API key - enter the secret API key from your Refersion account.

Here’s an image with generic API keys showing what your configuration setting should look like once completed:

You'll also want to navigate down to the Advanced Settings and set the Tracking Version to v4, which is our most up-to-date tracking version:

Step 3: Connect tracking to Refersion

From within your Refersion account, navigate to Account > Settings > Tracking and click the Add Tracking button and follow the on-screen prompts to connect your WordPress site.

IMPORTANT NOTE: Although WordPress does not require a secure website (HTTPS instead of HTTP), our tracking system does require a security match between the landing page and the checkout. This means that if your checkout is secure (as it almost always will be), your landing page MUST ALSO BE SECURE. Make sure to have your SSL in place and ensure you are linking to the secure version of your site.

Step 4: Run a test order

Because of the nature of WordPress sites, it is imperative that you run a test order to confirm there is no plugin conflict. You may choose to create a discount code, or simply pay and refund yourself.

Once you’ve placed your test order, you must mark the order COMPLETED within WooCommerce:

Important: Orders that are not marked as COMPLETED will NOT report into Refersion.

Once the order is marked as “Completed”, it should appear under the Manage>Conversions section of your Refersion account (usually this happens within a 10 minutes, but can take longer during certain periods of high volumes).

Please do not assume everything is connected and tracking properly without confirmation of a test order!

If you run into any problems along the way, please email us at [email protected].


Optional Features:

At the bottom of your Refersion plugin settings in WooCommerce, you will see an ‘Optional Features’ section, outlined below.

Adjust Refersion conversions for cancellations in WooCommerce?

This setting helps ensure you’re not paying commissions to affiliates for orders that have been canceled by your customer. With this enabled, when you mark an order as canceled in your WooCommerce store, Refersion will automatically create a “cancellation conversion.” The cancellation conversions display with the original order number, a negative order total, and a negative commission account.

As these conversions will offset each other, you can either approve or deny them both - just be sure to take the same action with both conversions.

You can enable this setting by changing this option to Yes, track WooCommerce cancellations in Refersion, then save your changes.

The Post-Purchase Widget

In order to utilize Refersion’s Post-Purchase feature in your WooCommerce store you’ll need to retrieve your post-purchase ‘code’ from Refersion by navigating to the Channels > Post-Purchase > Installation/Tracking Code tab.

You’ll find the code within that page in your Refersion account, as seen in the example screenshot (text highlighted in blue):

Copy this code and paste it into the Post Purchase Widget Code field in the Refersion plugin settings within WooCommerce. Then set the Show the post purchase widget on the Woocommerce thank you page? field to Yes, and you’re all set!

Add a prefix to orders sent into Refersion

If you have multiple WooCommerce stores connected to a single Refersion account you may want to configure this feature to help distinguish between conversions from each of those stores.

By default, all of your WooCommerce stores will be sending numeric order numbers into Refersion, which may result in duplicate order numbers, which Refersion will see as duplicate conversions. For example, if two of your connected stores send in Order 1234, our system will see Order 1234 from the second store as a duplicate of Order 1234 from the first store and the order will not be processed as a conversion for your affiliates.

To avoid this, you can add a prefix to the order numbers for each of your distinct WooCommerce stores. For example, you might add the prefix ‘US’ for your US store and the prefix ‘CA’ for your Canadian store. With the prefixes in place for each store, Order 1234 would report into Refersion as “US1234” for the US store and “CA1234” for the Canadian store. As a result, both orders would be processed individually as separate conversions for your affiliates.

Note: These order prefixes will only appear in Refersion and will not show up in the orders section of WooCommerce, the WooCommerce API, or in any other plugins.

Did this answer your question?