Skip to main content

How to add conversion tracking on your checkout page

Add tracking scripts to your checkout and thank-you pages, run scripts on every portal page, and redirect clients after they pay.

Written by Gabriel Lecointere

Use case: Your ad platform, affiliate tool or analytics account needs a tracking code on the page clients see after they pay. You can add that code in your portal settings, along with scripts that run on every logged-in page and an optional redirect after checkout.

Add your tracking scripts

  1. Go to Settings > Portal and open the Advanced tab.

  2. Find Custom scripts and click Checkout and thank-you page scripts.

    Custom scripts row on the Advanced tab of Portal settings
  3. Paste your code into the field you need (see below). Copy the snippet exactly as your tool gives it to you, including the opening and closing <script> tags. You can paste several snippets one after the other in the same field.

    Checkout and thank-you page scripts, Internal scripts and Redirect URL fields
  4. Click Save changes.

What each field does

  • Checkout and thank-you page scripts: loaded on your checkout pages and on the thank-you page clients see after paying. Before payment, they load on service checkouts, order forms and invoice payment pages. Use this field for conversion and purchase tracking from ad and referral platforms.

  • Internal scripts: loaded on every logged-in page of your portal, for your team and your clients. Use it for analytics, heatmaps or any code that must run inside the portal.

  • Redirect URL: where clients are sent after checkout. Once the payment is confirmed, the thank-you page waits about 3 seconds and then sends the client to this address. Leave it empty to keep the default thank-you page with its Go to dashboard button. Clients who report a manual payment are not redirected, because their payment is not confirmed yet.

Good to know

  • The redirect adds two parameters to your URL: purshased_items (the purchased items, separated by commas) and client (the client's name). Your own page can read them, for example to personalize a thank-you message.

  • Scripts in the first field also run on checkout pages before payment. If your tool should only count completed purchases, set its trigger to the thank-you page.

  • Using Tapfiliate? Its conversion tracking has its own integration, so you don't need to paste a script. See How to set up the Tapfiliate integration.

  • For other advanced portal options, see How to customize your client portal.

Did this answer your question?