Conversion Tracking for Regular Websites with Backend
This guide will help you configure the transmission of conversions from your regular website to the Adexium advertising network.
Step-by-Step Instruction
1. Create an Advertising Campaign
Create a new advertising campaign in your Adexium dashboard.
2. Configure the Campaign Link
In the campaign settings, specify the link to your website with the click_id parameter:
https://yourwebsite.com/landing?click_id=[CLICK_ID]Important:
- Replace
yourwebsite.com/landingwith your actual landing page URL - The
[CLICK_ID]parameter will be automatically replaced by Adexium - You can use any parameter name, but
click_idis recommended for clarity
3. Configure Processing on Your Backend
When a user clicks the ad link and lands on your website, you need to:
- Extract the
click_idparameter from the URL query string - Store this
click_idin your database (associate it with the user session, user ID, or cookie) - You can store it in:
- User session (if user is logged in)
- Database linked to user account
- Cookie or local storage (for anonymous users)
Example URL when user clicks:
https://yourwebsite.com/landing?click_id=d95c746d-31c7-4183-8fa7-42ce39b65e47Backend code example (pseudo-code):
// Extract click_id from URL
const urlParams = new URLSearchParams(window.location.search);
const clickId = urlParams.get('click_id');
// Send to your backend
fetch('/api/track-click', {
method: 'POST',
body: JSON.stringify({ click_id: clickId }),
headers: { 'Content-Type': 'application/json' }
});
// Or store in cookie/session
document.cookie = `adexium_click_id=${clickId}; path=/; max-age=2592000`; // 30 days4. Sending the Conversion
When the target action occurs (purchase, registration, form submission, etc.), send a GET request from your backend:
GET https://go.tgads.live/conversion?click_id=[CLICK_ID]Replace [CLICK_ID] with the stored value from step 3.
Backend code example (pseudo-code):
// When conversion happens (e.g., purchase completed)
async function sendConversion(userId) {
// Retrieve stored click_id for this user
const clickId = await getStoredClickId(userId);
if (clickId) {
// Send postback to Adexium
await fetch(`https://go.tgads.live/conversion?click_id=${clickId}`);
}
}Workflow Example
Campaign Link:
https://yourwebsite.com/landing?click_id=[CLICK_ID]Actual User Click:
https://yourwebsite.com/landing?click_id=d95c746d-31c7-4183-8fa7-42ce39b65e47User Lands on Website:
- Frontend extracts
click_id = d95c746d-31c7-4183-8fa7-42ce39b65e47 - Sends to backend or stores in session/cookie
- Backend saves
click_idassociated with user session
- Frontend extracts
User Completes Conversion:
- User performs target action (purchase, signup, etc.)
- Backend retrieves stored
click_idfor this user - Backend sends postback:
GET https://go.tgads.live/conversion?click_id=d95c746d-31c7-4183-8fa7-42ce39b65e47
Important Notes for Websites
- Cookie Duration: Store the
click_idfor at least 30 days to track delayed conversions - Multiple Conversions: You can send multiple conversions for the same
click_idif your campaign supports it - HTTPS Required: Ensure your website uses HTTPS for secure parameter transmission
- Server-Side Tracking: For better accuracy, handle the conversion tracking on your backend rather than client-side JavaScript
