Skip to main content

How to Track Offer Conversions

Manuel Frigerio avatar
Written by Manuel Frigerio
Updated today

When running an offer that requires a specific action (e.g., a purchase, a download, or a signup), you must notify SparkLoop when that action occurs.

You can achieve this in one of two ways:

  1. The Conversion Pixel (Easiest and fastest)

  2. The API (Best for app downloads or server-side tracking)

Method 1: Using the Conversion Pixel (Recommended)

This is the quickest way to set up tracking. It requires adding code to two specific pages on your website.

Step 1: The Landing Page

Paste the following code into the <head> tag of the page where users first arrive (the page you redirect them to from SparkLoop):

<script async src="https://c-js.sparkloop.app/c.js" data-sparkloop></script>

Step 2: The "Thank You" Page

Paste the following code into the <head> tag of the confirmation page users see after they have completed the action:

<script src="https://c-js.sparkloop.app/c.js" data-sparkloop></script>
<script>SparkLoop.trackConversion("{OFFER_ID}")</script>

โš ๏ธ Important: You must replace {OFFER_ID} in the code above with your actual Offer ID. You can find this ID inside your SparkLoop dashboard.

Platform-specific instructions

Method 2: Using the API

If you require extra security, or if you are tracking actions that do not happen on a web page (such as mobile app installs), you should use the API.

  • View the API Integration Guide here.


How to Test Your Setup

Once you have added the code, you should verify that SparkLoop is successfully receiving the conversion data. We have a built-in tool to help you do this.

Step 1. In your SparkLoop dashboard, open your offer and then click "Conversion Pixel". In there you will see this section

Step 2. Click on the button. This will automatically redirect you to your landing page.

  • Note: You may notice some "fake" parameters added to the end of your URL. This is intentional; it simulates a referral link click so we can track the test.

Step 3. Run through the conversion process exactly as a subscriber would (e.g., fill out the form, complete the purchase, or download the file).

Step 4. Once the action is complete, return to your SparkLoop dashboard.

Step 5. The status indicator/checkmark should now turn green, indicating the pixel fired correctly.


Troubleshooting

If you have installed the codes but are not seeing conversions appear in your SparkLoop dashboard, please check the following common issues.

1. Did you test with a referral link? (Most Common)

The conversion pixel relies on a tracking cookie to identify the user. If you visit your landing page directly (e.g., by typing the URL) and then convert, no conversion will be recorded because the tracking cookie is missing.

  • How to test correctly: Open an Incognito/Private window, click a generic SparkLoop referral link (or a test link from your dashboard), and then complete the purchase or action.

2. Is the Offer ID correct?

A common mistake is copying the code exactly as shown in the documentation without adding your specific ID.

  • The Fix: Check the code on your Thank You page. Ensure it reads something like SparkLoop.trackConversion("offer_14bd662") and not SparkLoop.trackConversion("{OFFER_ID}").

3. Verification: Is the script actually loading?

Sometimes caching plugins or theme settings prevent the code from appearing on the live site.

  • The Fix: Go to your live Thank You page. Right-click anywhere on the page and select View Page Source. Use Ctrl+F (or Cmd+F) to search for "SparkLoop". If you cannot find the script in the source code, you may need to clear your website cache or save your theme settings again.

4. Are you using an Ad Blocker?

If you are testing this yourself, browser extensions like uBlock Origin, Ghostery, or AdBlock Plus might be blocking the SparkLoop script from loading.

  • The Fix: Temporarily disable your ad blocker or use a "clean" browser profile when testing your conversion flow.

Did this answer your question?