Skip to main content

Troubleshooting

Common integration issues and how to resolve them. All examples reference API version v1.

Snippet not loading

Symptom: The Selgeo tracking snippet does not appear to execute. No network requests to Selgeo in the browser DevTools Network tab.

Possible causes:

  1. Script tag is missing or malformed. Verify the snippet is present in your page's HTML:

    <script
    src="https://cdn.selgeo.com/v1/selgeo.js"
    data-merchant="pk_test_YOUR_KEY"
    async
    ></script>

    Check for typos in the URL or the data-merchant attribute.

  2. Content Security Policy (CSP) is blocking the script. If your site uses a Content Security Policy, add https://cdn.selgeo.com to the script-src directive and https://api.selgeo.com to the connect-src directive:

    script-src 'self' https://cdn.selgeo.com;
    connect-src 'self' https://api.selgeo.com;
  3. Ad blocker or browser extension is blocking the request. Some privacy-focused browser extensions block third-party tracking scripts. Test in an incognito window with extensions disabled.

  4. Invalid API key. If the data-merchant value is not a valid pk_test_* or pk_live_* key, the snippet will fail silently. Verify the key in Settings > API Keys in the dashboard.

Clicks not appearing

Symptom: The snippet loads, but clicks do not show up in the dashboard.

Possible causes:

  1. Wrong mode. If you are using a pk_test_* key, clicks appear only in test mode. Toggle the mode selector in the dashboard to view test data.

  2. No referral parameter in the URL. The snippet looks for a referral identifier in the URL (e.g., ?ref=abc123). If a visitor arrives without a referral parameter, no click is recorded. Verify that the referral link includes the correct query parameter.

  3. Rate limit exceeded. The tracking endpoint allows 1,000 requests per minute per public key. If you exceed this limit, additional clicks are rejected with a 429 status. Check the browser DevTools Console for errors.

  4. Network error. Open the browser DevTools Network tab, filter for requests to api.selgeo.com, and check for failed requests. Common causes include DNS resolution issues, firewall rules, or CORS misconfigurations.

Conversions not attributed

Symptom: Conversions are reported via the Conversion API or Stripe webhook, but they do not appear as attributed conversions in the dashboard. The conversion exists but has no associated partner.

Possible causes:

  1. Missing or invalid click_id. The click_id links a conversion to its originating click. Without it, Selgeo cannot attribute the conversion to a partner.

    • For Conversion API integrations: make sure you are passing the click_id captured by the snippet.
    • For Stripe integrations: make sure the click_id is included in the Stripe session metadata (key: aff_click_id) or passed through the checkout flow.
  2. Attribution window expired. Each program has an attribution window (e.g., 30 days). If the conversion occurs after the window expires, no attribution is created. Check your program's attribution window in Programs > Settings.

  3. Partner is not approved. Conversions are attributed only to approved partners. If the partner's status is pending, rejected, or suspended, the conversion is recorded but no commission is created.

  4. Duplicate conversion. If you send the same external_transaction_id twice, the second request is rejected with a 409 CONVERSION_DUPLICATE error. This is expected behavior for idempotent retries.

  5. Mode mismatch. A click_id generated with a pk_test_* key can only be matched by a conversion reported with an sk_test_* key (and vice versa for live keys). Mixing test and live keys across the flow will result in unattributed conversions.

click_id missing

Symptom: Your server-side code does not have access to the click_id that the snippet captured on the client side.

How to resolve:

The click_id is stored by the snippet and must be passed from the client to your server during the checkout or sign-up flow. The method depends on your integration:

Stripe Checkout integration:

Stripe Checkout sessions are created server-side, so you must pass the click_id manually. Read it on the client with __selgeo.getClickId() and include it as session metadata when creating the Checkout Session on your server:

const session = await stripe.checkout.sessions.create({
// ... your session params
metadata: {
aff_click_id: clickId, // Pass the click_id from the client
},
});

Conversion API integration:

Read the click_id from the client (the snippet exposes it via __selgeo.getClickId()) and include it in a hidden form field, cookie, or your application's session storage. Then pass it to the Conversion API when reporting the conversion:

// Client-side: get the click_id
const clickId = __selgeo?.getClickId();

// Include clickId in your form submission or API call to your backend
# Server-side: report the conversion with the click_id
curl -X POST https://api.selgeo.com/api/v1/conversions \
-H "Authorization: Bearer sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"click_id": "THE_CLICK_ID",
"event_type": "purchase",
"external_transaction_id": "txn_123",
"amount_cents": 4900,
"currency": "EUR"
}'

Stripe Payment Links:

Stripe Payment Links do not support custom metadata. The Selgeo snippet automatically appends client_reference_id to Payment Link URLs. No manual click_id passing is needed.

Still stuck?

If none of the above resolves your issue:

  1. Check the Attribution Audit Log in the dashboard for detailed attribution decisions.
  2. Verify your integration in test mode first — it is easier to debug with test data.
  3. Contact support with your merchant account ID and any request IDs you included via the X-Request-Id request header (or the timestamp and endpoint of the failing request).