Skip to main content

Conversion Tracking

Conversion tracking allows you to measure the effectiveness of your campaigns by tracking when users complete desired actions after clicking your ads.

How It Works

  1. User clicks your ad - Pushnami generates a unique Conversion ID
  2. User lands on your page - You capture the Conversion ID from the URL
  3. User converts - You send a postback to Pushnami with the Conversion ID
  4. Pushnami records the conversion - The conversion is attributed to the correct campaign, creative, and source

Setup Guide

Include the <<conversion_id>> parameter in your destination URL using the Link Builder:

https://yoursite.com/offer?cid=<<conversion_id>>

Step 2: Capture the Conversion ID

When a user clicks your notification and lands on your page, capture the cid parameter from the URL and store it (in a cookie, session, or database) for later use.

Step 3: Post Back Conversions

When a conversion occurs, send a postback to Pushnami:

https://revtrc-api.pushnami.com/convert?t={conversion_id}&v={value}

Parameters:

  • t - The conversion ID captured from the click (required)
  • v - The conversion value in dollars (optional, for revenue tracking)

Implementation Examples

JavaScript (Client-Side)

Capture the conversion ID when the user lands on your page:

// Get conversion ID from URL
function getConversionId() {
const params = new URLSearchParams(window.location.search);
return params.get('cid');
}

// Store it for later use
const conversionId = getConversionId();
if (conversionId) {
localStorage.setItem('pushnami_cid', conversionId);
}

Fire the conversion when the user completes the desired action:

// Fire conversion postback
function trackConversion(value = null) {
const conversionId = localStorage.getItem('pushnami_cid');
if (!conversionId) return;

let url = `https://revtrc-api.pushnami.com/convert?t=${conversionId}`;
if (value) {
url += `&v=${value}`;
}

// Using fetch API
fetch(url, { method: 'GET', mode: 'no-cors' });

// Clear the stored ID to prevent duplicate conversions
localStorage.removeItem('pushnami_cid');
}

// Example: Track conversion on form submit
document.getElementById('signup-form').addEventListener('submit', function() {
trackConversion(9.99); // Optional: include conversion value
});

JavaScript (Server-Side / Node.js)

const https = require('https');

async function trackConversion(conversionId, value = null) {
let url = `https://revtrc-api.pushnami.com/convert?t=${conversionId}`;
if (value) {
url += `&v=${value}`;
}

return new Promise((resolve, reject) => {
https.get(url, (res) => {
resolve({ status: res.statusCode });
}).on('error', reject);
});
}

// Example usage
app.post('/purchase-complete', async (req, res) => {
const { conversionId, orderTotal } = req.body;

try {
await trackConversion(conversionId, orderTotal);
console.log('Conversion tracked successfully');
} catch (error) {
console.error('Failed to track conversion:', error);
}

res.json({ success: true });
});

Testing Your Setup

Use the Test Link feature in the Link Builder to verify your tracking:

  1. Add <<conversion_id>> to your link
  2. Click the "Test Link" button
  3. A test URL is generated with a sample Conversion ID
  4. Complete a test conversion
  5. Use the provided test postback link to confirm tracking works
tip

Always test your conversion tracking before launching a campaign to ensure accurate reporting.

Troubleshooting

Conversions Not Recording

  1. Check the Conversion ID - Ensure you're capturing and storing the cid parameter correctly
  2. Verify the postback URL - The URL must be exactly https://revtrc-api.pushnami.com/convert
  3. Check for duplicates - Each conversion ID can only be used once
  4. Timing issues - Ensure the postback fires after the conversion is complete

Incorrect Conversion Values

  1. Check the v parameter - Values should be numeric (e.g., 9.99 not $9.99)
  2. URL encoding - Ensure special characters are properly encoded

Source Attribution Not Working

If conversions are recording but not attributing to sources correctly, ensure you're also passing the source ID in your tracking links:

https://yoursite.com/offer?cid=<<conversion_id>>&source={{=data.adsourceid}}

Requirements for Source Optimization

Important

For Source Optimization to work correctly:

  • Conversion ID (<<conversion_id>>) - Required to track conversions
  • Source ID ({{=data.adsourceid}}) - Optional but highly recommended for source-level quality optimization (CVR)

Without the Conversion ID, the system cannot track conversions. Including the Source ID allows the system to identify which sources deliver the best conversion rates and optimize bids accordingly.

Tracking Platform Integrations

Need to integrate with a third-party tracking platform? See our platform-specific guides:

  • Everflow - Affiliate tracking platform with automatic postback firing
  • Voluum - Cloud-based ad tracking and optimization
  • RedTrack - Ad tracking and conversion attribution platform
  • HitPath - Enterprise-grade affiliate tracking platform

Next Steps