Custom Conversion

Are you using a custom built checkout solution for your WordPress powered business, instead of relying on one of the plugins SliceWP integrates with? Or are you using an eCommerce plugin that SliceWP doesn’t integrate with?

If so, the Custom Conversion add-on can be the right fit for you.

As long as you have an order confirmation page where you redirect customers after completing a purchase, you should be good to go.

Let’s dive into the setup process and get you started with the custom conversion feature.

Step 1: Understanding the conversion tracking shortcode

Whenever one of your affiliates is referring a visitor to your business’ website, SliceWP will track the visit by storing data within a cookie on the visitor’s browser.

However, if you’re not using one of the eCommerce plugins that SliceWP integrates with, when this referred visitor completes the purchase, no commission will be created for the referring affiliate.

To be able to generate a commission for these situations, we’ll be using the shortcode.

This shortcode houses the conversion script that will 1) generate a commission for the referring affiliate and 2) will mark the referred visit as converted.

If you are unfamiliar with shortcodes, please click here to learn more about them.

Step 2: Adding the conversion tracking shortcode to your order confirmation page

Now that you know what the tracking shortcode does behind the scenes, let’s add it to your order confirmation page.

To do this, navigate to the order’s confirmation page edit screen and add the shortcode somewhere within the page’s content. The position of the shortcode inside the page does not matter.

Now that you have the shortcode on your page, to have it working as you need it to, you will have to pass it some data, in the form of attribute values.

These are the supported attributes of the shortcode:

  • origin (required) – The name of your custom checkout solution. Please note that this value needs to be in all small caps and no spaces. For example, if you’re using Stripe, the origin can be “stripe”.
  • amount (required) – The product or service full price. This is NOT the commission amount, but the full price the customer just paid. The commission’s amount will be calculated based on the amount value you provide here.
  • reference (required) – The unique ID used to reference the order. For example, SliceWP uses the “reference” value for a commission to store the unique ID of the referred customer’s order. This way, the plugin can trace back a commission to an order. This value is NOT created automatically by the plugin and you need to provide it. The value can be the booking ID, the order ID, the submission ID, the entry ID, depending on the setup you have.
  • type (optional) – The type of commission that should be generated, defaults to “sale” if not set.
  • status (optional) – The status the commission should have when generated, defaults to “pending” if not set.

This is how the shortcode looks like with all attributes:

[slicewp_custom_conversion amount="40.00" origin="my-integration" reference="2031" type="sale" status="unpaid"]

Using URL query arguments to populate the shortcode attributes

Because in most cases, the data the shortcode is looking for needs to be dynamic, you can pass these attributes via the URL’s query arguments.

For example, you can add the amount and the reference value via URL query arguments. In this case, you no longer need to add these attributes to the shortcode itself.

So, your shortcode can look like this:

[slicewp_custom_conversion origin="my-integration"]

As you can notice, the shortcode is missing the type and status attributes as well. Considering that these attributes are optional, if their default values work for you, you can leave them out altogether.

For the above example, you will need to add the amount and reference value as query parameters in the redirect URL from the checkout page to the order confirmation page.

So, once the referred visitor makes the payment, or completes a process (such as a booking), you should redirect them to your order confirmation page, while also adding the amount and reference values to the redirect URL, which could look something like this:{amount}&reference={order_ID}

In this example, the {amount} and {order_ID} represent tags from the plugin/system you’re using that are dynamically replaced with the actual values for this particular submission.

Step 3: Testing that the system work

Now that you have your setup ready, let’s test it out to make sure it’s working as it should. Here’s how:

  1. Copy an affiliate’s referral link and open a new incognito/private browsing window.
  2. Access your website via the affiliate’s referral link. At this point, you should have a new visit showing up in SliceWP > Visits for the affiliate in question.
  3. Go through the checkout process. Once you complete the payment/submission, you should be redirected to the confirmation page where the conversion tracking shortcode is placed.
  4. Once you are redirected to this page, a commission should appear for the affiliate in question. You can view it in SliceWP > Commissions.
  5. That’s it! Your custom referral solution is working.

If however the commission is still not showing up, please enable the Debug Log from SliceWP > Settings > Tools (tab). With the debug log enabled, retry the checkout process.

If the plugin encounters any errors, they will appear in the Debug Log. Based on these errors, you may be able to understand what is happening and why the commission was not created.

Get started with SliceWP

Start your affiliate program today and take your business to new heights.

Get SliceWP

This add-on is available with an active Pro & Pro Plus license.

View pricing