# Testing and Troubleshooting CPA Pixels

This article will walk you through how to test/troubleshoot your CPA affiliate pixels.

* [Check Affiliate Profile Setup](#testingandtroubleshootingcpapixels-checkaffiliateprofilesetup)
* [Configure APIs on the funnel](#testingandtroubleshootingcpapixels-configureapisonthefunnel)
* [Place a Test](#testingandtroubleshootingcpapixels-placeatest)
* [Check Results](#testingandtroubleshootingcpapixels-checkresults)
* [If the pixel did not fire](#testingandtroubleshootingcpapixels-ifthepixeldidnotfirepixel-didnt-fire)
* [Pixel Flowchart](#testingandtroubleshootingcpapixels-pixelflowchart)

{% hint style="info" %}
What you’ll need:

* Campaign Name or Id
* Affiliate Name or Id
  {% endhint %}

***

### Check Affiliate Profile Setup <a href="#testingandtroubleshootingcpapixels-checkaffiliateprofilesetup" id="testingandtroubleshootingcpapixels-checkaffiliateprofilesetup"></a>

Navigate to **CRM → Affiliates** and edit the affiliate profile to view the campaigns and pixels that have been assigned.

* The affiliate must be added to the campaign that their traffic is running to.
* There should be a CPA pixel added into the pixels section for that campaign.

If the affiliate is not [assigned to a campaign](/crm/crm-setup/affiliate-setup/adding-and-editing-affiliates.md) or you do not have a [CPA pixel set up](/crm/crm-setup/affiliate-setup/affiliate-pixels.md), do this now.

In the **Pixels** tab -

* Do you have a pixel for the appropriate campaign? If you do not, do this now.
  * Is it a Main Offer Pixel (only fires after Import Order) or Upsell Pixel (only fires after Import Upsell)? *Note: An affiliate can only have one pixel for the main checkout and one for each upsell per campaign*
  * Is the pixel set up for a Specific Product? *Note: This will fire only if the campaign product ID is purchased as an upsell*
* Run a quick eye test
  * Commission Type: CPA
  * Pixel Type: Must be Postback for Direct API integrations
  * Content: No typos and correct use of tokens

<figure><img src="/files/9UQCYAmcMmkZxX9dKDbR" alt=""><figcaption></figcaption></figure>

Please see [this article](/crm/crm-setup/affiliate-setup/affiliate-pixels.md) for more information on adding your pixel.

{% hint style="success" %}
Confirm that:

* Affiliate is assigned to the appropriate campaign
* Pixel is created properly (including campaign)
* Pixel content is accurate
  {% endhint %}

***

### Configure APIs on the funnel <a href="#testingandtroubleshootingcpapixels-configureapisonthefunnel" id="testingandtroubleshootingcpapixels-configureapisonthefunnel"></a>

#### **Add Import Click API**

If you have not already, have your developer implement the [Import Click API ](https://apidocs.checkoutchamp.com/#e576c9e1-2606-49c2-8ac0-143a35c7add2)call on your funnel and follow our [Suggested API Flow](/api-documentation/api-documentation/recommended-api-flow.md) documentation. This will store the passed values to the session allowing you to track clicks coming from the affiliate. If the customer completes the sale, those passedValues are used to fire any pixels and can also be used within your pixel content.

{% hint style="warning" %}
To store the passed values to a session before a sale is made, the Import Click call must pass the requestUri **(containing the affId and passedValues)** as well as the **campaignId** that the pixel is configured for.
{% endhint %}

{% hint style="success" %}
The very first Import Click call for a session will return a sessionId. Be sure this sessionId is being passed on the subsequent API calls for that customer’s order session.
{% endhint %}

\
**Add affId and sourceValue1-5 to Import Lead/Import Order API**

If you would like, you can also pass the affId and sourceValues on the Import Lead and/or Import Order API request.

***

### Place a Test <a href="#testingandtroubleshootingcpapixels-placeatest" id="testingandtroubleshootingcpapixels-placeatest"></a>

Run a test using the **Affiliate Test Link.**

* Open the affiliate’s test link in a new window or tab
* Check if the generated affiliate values are present in the URL string

Place an order using the CheckoutChamp test card (0000000000000000 with cvv 100 and any current/future expiration date)

***

### Check Results <a href="#testingandtroubleshootingcpapixels-checkresults" id="testingandtroubleshootingcpapixels-checkresults"></a>

**Navigate to Reports → Customers → Order Details to find your test order**

* Check the **Source** and **Campaign** columns to immediately see if right campaign and affiliate were linked to order. If the source or campaign are incorrect, please [go to this section](#testingandtroubleshootingcpapixels-ifthepixeldidnotfirepixel-didnt-fire).

<figure><img src="/files/Hjh4m7ym5AXcgKQoHHJZ" alt=""><figcaption></figcaption></figure>

**Click the customer’s name to go to their Customer Profile page**

* Check the source values (under **Other Info**)
  * Does the campaign and source values line up with the passed values set for the affiliate and those that you saw created for the tracking string by the test link? If not, please [go to this section](#testingandtroubleshootingcpapixels-ifthepixeldidnotfirepixel-didnt-fire).

<figure><img src="/files/kso7hARqC92kGTEToNtY" alt=""><figcaption></figcaption></figure>

**Click on the customer’s orderId to go to the Order Details page**

* Click **View Details** next to the **Pixels** label inside the **Details** panel.
  * What is the response?
  * If testing an upsell pixel, check the **campaign product IDs**.
  * Ask the affiliate what they are seeing on their end and what that response means.
  * Sometimes the affiliate does not allow duplicate pixel tests. In this scenario you will need to ask the affiliate for a new test link.
* If checking a non-test card order, is the credit card marked as prepaid?
  * No CPA pixels will fire for orders placed using a prepaid card.

<figure><img src="/files/7xEHoF0XOfnt438BS5O3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Confirm that:

* The pixel fired
* The pixel content what you/the affiliate expected
  {% endhint %}

***

### If the pixel did not fire <a href="#testingandtroubleshootingcpapixels-ifthepixeldidnotfirepixel-didnt-fire" id="testingandtroubleshootingcpapixels-ifthepixeldidnotfirepixel-didnt-fire"></a>

If the affiliate info or campaign is not correct then the pixel will not fire. Look at the API logs **(Admin → Logs → API tab)** to confirm which affiliateId, campaignId, and productId were sent in your Import Lead and/or Import Order call.

<figure><img src="/files/nD6cssc7fUsPdbLh7NsG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/5gb0r49jjuMGJPRbql2D" alt=""><figcaption></figcaption></figure>

If any of these do not match how a pixel is setup, then a pixel will not fire.

**After you determine the issue and deploy a fix, place a new test and check the results again.**

***

### Pixel Flowchart <a href="#testingandtroubleshootingcpapixels-pixelflowchart" id="testingandtroubleshootingcpapixels-pixelflowchart"></a>

{% file src="/files/gFlyYNzFUQn5C9o4EWHY" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.checkoutchamp.com/crm/crm-setup/affiliate-setup/affiliate-pixels/testing-and-troubleshooting-cpa-pixels.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
