Advertiser Docs / Advertiser SDK
Advertiser Tracking

TrackNova advertiser integration guide.

Install one organization-level TrackNova tag, keep the click ID through the funnel, and let TrackNova handle pixels, postbacks, and event-name translation centrally.

Public, step-by-step version. The app-host guide stays as the detailed reference for deeper examples.
Back to Advertiser Docs Overview
Implementation path

How an advertiser should implement this with minimum effort

Keep the browser SDK where possible. Use S2S or pixel only when the conversion lives outside the page.

01

Capture the click ID

Preserve tn_cid or cid as the user moves from landing page to checkout.

02

Install once

Place the base SDK on the advertiser page, tag manager, or thank-you page where the event is confirmed.

03

Fire the event

Send conversion by default, or the exact custom event key configured in TrackNova.

04

Pass only needed values

Add lead_id, order_id, txid, revenue, or currency only when required.

05

Validate in QA

Check the network request, confirm the event key is active, and verify the conversion appears in reporting.

Tracking Domain https://trk.tracknova.in
Canonical Base Tag Organization-level
Primary Goal Confirmed conversion reporting

1. What the Wrapper Does

  1. A visitor clicks a TrackNova tracking link.
  2. TrackNova creates a unique click ID and redirects the visitor to the advertiser landing page.
  3. The landing URL contains `tn_cid` and/or `cid`.
  4. The SDK stores that value in a first-party cookie named `_tn_cid`.
  5. When the advertiser confirms a lead, registration, sale, or other action, the page calls `TN.track()`.
  6. TrackNova records the conversion event and routes publisher-side pixels/postbacks based on the mappings configured in TrackNova.
Advertisers should not install publisher pixels directly unless TrackNova specifically asks them to. Publisher code belongs in TrackNova.

2. The TrackNova Click ID

The TrackNova click ID is generated before the visitor reaches the advertiser website. It is not the publisher click ID.

Expected landing URL

https://advertiser-site.com/landing-page?tn_cid=TRACKNOVA_CLICK_ID

Also supported

https://advertiser-site.com/landing-page?cid=TRACKNOVA_CLICK_ID

  • Preserve tn_cid or cid through landing-page redirects.
  • Preserve the click ID when moving from landing page to checkout.
  • If checkout is on another domain, store the click ID and pass it forward.
  • Do not replace TrackNova cid with a publisher click ID.

3. Install the Base SDK

Install this script on the landing page and every page where a conversion may be fired. For most websites, install it globally in the site header or tag manager.

Your CLIENT_ID is the tenant public_key. Find it in the app at https://app.tracknova.in/settings/general.
Base install tag
<script
  src="{{TRACKING_DOMAIN}}/js/tracknova.js"
  data-client="{{CLIENT_ID}}"
  data-url="{{TRACKING_DOMAIN}}">
</script>

src

URL of the TrackNova browser SDK. This should come from the configured tracking domain, not a hardcoded host.

data-client

TrackNova organization key for your organization. This is not an advertiser ID, offer ID, or event key.

data-url

TrackNova tracking domain that receives browser events.

Example resolved from the configured tracking domain:
<script
  src="{{TRACKING_DOMAIN}}/js/tracknova.js"
  data-client="{{CLIENT_ID}}"
  data-url="{{TRACKING_DOMAIN}}">
</script>

4. Organization, Offer, and Event

The base tag is organization-level. It identifies your organization, not an advertiser, publisher, or offer.

For normal conversions, TrackNova uses the click ID to find the exact offer. The event key tells TrackNova which action happened on that offer.

data-client TrackNova organization key for your organization.
cid / tn_cid TrackNova click ID. This resolves the offer, publisher, and attribution context.
conversion or custom event key The action being reported. It must exist as an active event for the offer being converted.

5. Fire the Default Conversion Event

Use conversion as the default event when the advertiser only needs to report that a successful action happened.

Default conversion
<script>
  TN.track('conversion');
</script>

Suitable for simple leads, signups, registrations, thank-you pages, or fixed-payout events where TrackNova already knows the commercial values from the offer setup.

6. Send Optional Advertiser References

For lead or registration events, the advertiser may include their own reference values.

Advertiser references
<script>
  TN.track('conversion', {
    lead_id: 'LEAD-12345',
    order_id: 'THANKYOU-12345'
  });
</script>

These values help with reconciliation, support, and reporting. They are optional unless agreed in the advertiser setup.

7. Send Sale or Revenue Values

Only send revenue fields when the event is a sale, purchase, order, cart value, dynamic payout, or revshare event.

Revenue event
<script>
  TN.track('conversion', {
    revenue: 150.00,
    sale_amount: 150.00,
    currency: 'USD',
    order_id: 'ORDER-10045'
  });
</script>

revenue

The value TrackNova should use for reporting or revenue calculation.

sale_amount

The original sale/order amount when different from revenue.

currency

Optional if the offer has a fixed/default currency.

order_id / txid / transaction_id

Can be used for advertiser-side reconciliation.

The SDK normalizes common aliases:
Advertiser sends TrackNova normalizes to
amount, value, total, order_total revenue and sale_amount when missing
order_id, orderId, transaction_id, transactionId txid when missing

8. What Is Required Depends on the Offer Event

TrackNova decides required payload fields from the offer-event configuration.

TrackNova offer-event setup Advertiser payload
Non-billable lead/signup/registration TN.track('conversion') is enough.
Fixed payout or fixed revenue Event only, optionally with lead_id, order_id, or txid.
Dynamic sale or revshare Send revenue or sale_amount. Send currency when needed.
Custom funnel event Use the configured event key, for example TN.track('kyc_approved').
Advertiser code should not guess publisher event names. TrackNova maps TrackNova event keys to publisher-specific names centrally.

9. Custom Event Keys

If TrackNova gives the advertiser a custom event key, use it as the first argument.

Custom event example
<script>
  TN.track('kyc_approved', {
    lead_id: 'LEAD-12345'
  });
</script>

conversion

Default successful action.

lead

Lead submitted.

registration

Account created.

purchase

Purchase completed.

kyc_approved

Custom advertiser funnel stage.

The event key must exist as an active event in TrackNova for that offer.

10. Advertiser S2S Postback

Use server-to-server tracking when the confirmed conversion lives in the advertiser backend, CRM, billing system, or an offline workflow.

S2S URL
{{TRACKING_DOMAIN}}/postback?cid={cid}&event=conversion&txid={order_id}&sale_amount={amount}¤cy=USD
Parameter Meaning
cid Required TrackNova click ID.
event Offer event key. Defaults to conversion when omitted.
txid Advertiser order, lead, or transaction ID.
sale_amount Original sale/order amount for sale or revshare events.
revenue Optional dynamic revenue override.
currency Optional three-letter currency code when advertiser financial values differ from the offer default.
Example:
{{TRACKING_DOMAIN}}/postback?cid={cid}&event=purchase&txid={order_id}&sale_amount={amount}¤cy=USD

11. Advertiser Pixel URL

Use the pixel endpoint when the advertiser can place an image pixel or iframe on a confirmation page but cannot run the full JavaScript SDK.

Pixel URL
{{TRACKING_DOMAIN}}/pixel?cid={cid}&event=conversion&txid={order_id}&sale_amount={amount}¤cy=USD

Image pixel

<img src="{{TRACKING_DOMAIN}}/pixel?cid={cid}&event=conversion&txid={order_id}&sale_amount={amount}" width="1" height="1" border="0" style="display:none" alt="" />

Iframe pixel

<iframe src="{{TRACKING_DOMAIN}}/pixel?cid={cid}&event=conversion&txid={order_id}&sale_amount={amount}" width="1" height="1" frameborder="0" scrolling="no" style="display:none"></iframe>

Parameter Meaning
cid Required. Replace {cid} with the TrackNova click ID.
event Optional. Defaults to conversion when omitted.
txid Advertiser order, lead, or transaction ID.
sale_amount Order value for sale, revenue, or revshare events.

13. Common Installation Patterns

Thank-you page

Use this when the conversion happens after a form submit, registration, checkout, or payment confirmation.

Thank-you page
<script
  src="https://trk.tech-nova.tech/js/tracknova.js"
  data-client="CLIENT_ID"
  data-url="https://trk.tech-nova.tech">
</script>

<script>
  TN.track('conversion');
</script>

Sale confirmation page

Sale confirmation
<script
  src="https://trk.tech-nova.tech/js/tracknova.js"
  data-client="CLIENT_ID"
  data-url="https://trk.tech-nova.tech">
</script>

<script>
  TN.track('conversion', {
    revenue: window.order.total,
    sale_amount: window.order.total,
    currency: window.order.currency || 'USD',
    order_id: window.order.id
  });
</script>

Single-page app

SPA pattern
const payload = {};

if (order?.id) payload.order_id = order.id;
if (order?.total) {
  payload.revenue = order.total;
  payload.sale_amount = order.total;
  payload.currency = order.currency || 'USD';
}

window.TN.track('conversion', payload);

Backend-confirmed but browser-fired

Backend-confirmed pattern
fetch('/api/create-order', { method: 'POST', body: formData })
  .then((response) => response.json())
  .then((order) => {
    window.TN.track('conversion', {
      revenue: order.total,
      currency: order.currency,
      order_id: order.id
    });
  });

14. Browser Network Behavior

When the advertiser website and TrackNova tracking domain are different domains, the browser may send an OPTIONS request before the real POST.

This is normal CORS preflight behavior.

Request Meaning
OPTIONS /api/tracknova/track with 204 Browser asks whether the cross-domain POST is allowed.
POST /api/tracknova/track with 200 Real TrackNova event was accepted.
The 204 preflight request is not a conversion.

15. QA Checklist

  1. Open a real TrackNova tracking link.
  2. Confirm the final landing URL contains tn_cid or cid.
  3. Complete the advertiser action.
  4. In browser DevTools, verify POST /api/tracknova/track returns 200.
  5. For pixels, verify GET /pixel returns 200.
  6. Confirm the event key is active for the offer in TrackNova.
  7. Confirm the conversion appears in TrackNova reporting.
  8. Confirm publisher dispatch logs show the expected publisher payload.

16. What Not To Do

  • Do not install publisher pixels directly on the advertiser site.
  • Do not expose API keys or private tokens in browser code.
  • Do not fire TN.track() before the lead, registration, or order is confirmed.
  • Do not send revenue values for non-commercial events unless TrackNova asks for them.
  • Do not use a publisher click ID as TrackNova cid.
  • Do not invent event keys; use the exact event keys configured in TrackNova.

17. When To Use Server-to-Server Instead

Use TrackNova S2S postback when:

  • The conversion happens only on the backend.
  • The visitor never reaches a browser thank-you page.
  • The conversion is a CRM update, subscription rebill, offline sale, or delayed approval.
  • You need backend-only validation before firing the event.
For S2S tracking, capture tn_cid from the landing URL, store it in your system, and send it to TrackNova when the backend confirms the event.