PopTrade SDK: Complete Conversion Tracking Guide
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:
- Captures the click ID when a user arrives from a PopTrade ad
- Stores it in a first-party cookie
- Sends conversion events back to PopTrade when triggered
- 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
| Event | Description | Typical Use |
|---|---|---|
| pageview | Page was viewed | Landing page tracking |
| signup | User registered | Lead generation |
| purchase | Transaction completed | E-commerce |
| deposit | User deposited funds | Gambling, Finance |
| install | App was installed | Mobile apps |
| subscribe | Subscription started | SaaS, Subscriptions |
| custom | Any custom event | Flexible 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:
- Open Network tab
- Filter by "tradepop"
- Trigger a conversion
- 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
- Install the SDK on your landing pages
- Set up conversion events for your key actions
- Wait for data to accumulate (24-48 hours)
- Create Smart Rules based on conversion metrics
- Optimize campaigns using ROI data
With conversion tracking, you'll finally know which traffic sources actually make money — and scale them aggressively.