Back to Blog
Advertiser Playbook

PopTrade SDK: Complete Conversion Tracking Guide

November 27, 20254 min read

Why Track Conversions?

Without conversion tracking, you're flying blind. You know how much you spend, but not what you get back. PopTrade SDK lets you track any event — signups, purchases, deposits, app installs — and attribute them to specific campaigns, placements, and traffic sources.

How the SDK Works

The PopTrade SDK is a lightweight JavaScript snippet (similar to Facebook Pixel) that:

  1. Captures the click ID when a user arrives from a PopTrade ad
  2. Stores it in a first-party cookie
  3. Sends conversion events back to PopTrade when triggered
  4. Attributes the conversion to the original traffic source

Installation

Step 1: Get Your SDK Code

Go to Campaigns → SDK Generator and copy your personalized snippet:

<script>
(function(p,o,t,r,a,d,e){p['PopTradeObject']=a;p[a]=p[a]||function(){
(p[a].q=p[a].q||[]).push(arguments)},p[a].l=1*new Date();d=o.createElement(t),
e=o.getElementsByTagName(t)[0];d.async=1;d.src=r;e.parentNode.insertBefore(d,e)
})(window,document,'script','https://sdk.tradepop.io/pt.js','poptrade');

poptrade('init', 'YOUR_ADVERTISER_ID');
</script>

Step 2: Add to Your Website

Paste the snippet in the <head> section of every page where conversions might happen.

Step 3: Track Events

Call poptrade('track', ...) when conversions occur:

// Track a signup
poptrade('track', 'signup', {
  value: 0,
  currency: 'USD'
});

// Track a purchase
poptrade('track', 'purchase', {
  value: 49.99,
  currency: 'USD',
  order_id: 'ORD-12345'
});

// Track a deposit (gambling/finance)
poptrade('track', 'deposit', {
  value: 100,
  currency: 'USD',
  user_id: 'USR-789'
});

Supported Events

EventDescriptionTypical Use
pageviewPage was viewedLanding page tracking
signupUser registeredLead generation
purchaseTransaction completedE-commerce
depositUser deposited fundsGambling, Finance
installApp was installedMobile apps
subscribeSubscription startedSaaS, Subscriptions
customAny custom eventFlexible tracking

Server-Side Tracking

For sensitive conversions (like deposits), use server-side tracking:

POST https://api.tradepop.io/conversions/track/
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "click_id": "abc123...",
  "event": "deposit",
  "value": 100,
  "currency": "USD",
  "timestamp": "2025-01-15T10:30:00Z"
}

Server-side tracking is more reliable and harder to block.

Postback URLs

If you use a tracking platform (Voluum, Binom, etc.), set up postback URLs:

https://api.tradepop.io/postback?click_id={clickid}&event=conversion&payout={payout}

Replace macros with your tracker's variables.

Viewing Conversion Data

Once tracking is set up, you'll see:

  • Dashboard — Total conversions, revenue, ROI
  • Campaign Stats — Conversions per campaign
  • Source Breakdown — Which placements convert best
  • Smart Rules — Automate based on conversion data

Debugging

Use browser DevTools to verify:

  1. Open Network tab
  2. Filter by "tradepop"
  3. Trigger a conversion
  4. Check the request payload and response

Common issues:

  • No click_id — User didn't come from PopTrade ad
  • Cookie blocked — Third-party cookies disabled (use server-side)
  • Wrong domain — SDK must be on the conversion domain

Privacy & Compliance

The SDK:

  • Uses first-party cookies only
  • Doesn't track personal data
  • Works with cookie consent banners
  • Complies with GDPR when properly implemented

Next Steps

  1. Install the SDK on your landing pages
  2. Set up conversion events for your key actions
  3. Wait for data to accumulate (24-48 hours)
  4. Create Smart Rules based on conversion metrics
  5. Optimize campaigns using ROI data

With conversion tracking, you'll finally know which traffic sources actually make money — and scale them aggressively.

Share: