Skip to content

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.

In the campaign settings, specify the link to your website with the click_id parameter:

http
https://yourwebsite.com/landing?click_id=[CLICK_ID]

Important:

  • Replace yourwebsite.com/landing with your actual landing page URL
  • The [CLICK_ID] parameter will be automatically replaced by Adexium
  • You can use any parameter name, but click_id is recommended for clarity

3. Configure Processing on Your Backend

When a user clicks the ad link and lands on your website, you need to:

  1. Extract the click_id parameter from the URL query string
  2. Store this click_id in your database (associate it with the user session, user ID, or cookie)
  3. 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-42ce39b65e47

Backend code example (pseudo-code):

javascript
// 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 days

4. Sending the Conversion

When the target action occurs (purchase, registration, form submission, etc.), send a GET request from your backend:

http
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):

javascript
// 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

  1. Campaign Link:https://yourwebsite.com/landing?click_id=[CLICK_ID]

  2. Actual User Click:https://yourwebsite.com/landing?click_id=d95c746d-31c7-4183-8fa7-42ce39b65e47

  3. User Lands on Website:

    • Frontend extracts click_id = d95c746d-31c7-4183-8fa7-42ce39b65e47
    • Sends to backend or stores in session/cookie
    • Backend saves click_id associated with user session
  4. User Completes Conversion:

    • User performs target action (purchase, signup, etc.)
    • Backend retrieves stored click_id for 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_id for at least 30 days to track delayed conversions
  • Multiple Conversions: You can send multiple conversions for the same click_id if 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