DigiKube

Revenue Integration Guide

For JS tag vendors integrating with the DigiKube bidder

Overview

DigiKube's bidder serves your JS tag template as the ad creative via OpenRTB. When the bidder wins an auction, your tag is returned with macros substituted (bid ID, subid, etc.). Your ad server should fire postback pixels at key events so DigiKube can optimize bids based on real revenue data.

How It Works

1

SSP sends bid request

DigiKube evaluates active campaigns against request attributes

2

DigiKube wins the auction

Ad markup with your JS tag template is returned to the exchange

3

Your tag loads on publisher page

Template macros are substituted with auction values (bid ID, subid, etc.)

4

User sees ad — impression postback fires

Your server sends GET to /pb/imp with estimated revenue value

5

User clicks — click postback fires

Your server sends GET to /pb/click with RPC value

6

Conversion happens — conversion postback fires

Your server sends GET to /pb/conv with CPA value

7

DigiKube computes eCPM and adjusts bids

Postback data is aggregated per subid to calibrate future bid prices

8

(Optional) Hourly revenue report pulled for calibration

DigiKube polls your report endpoint to reconcile approved vs estimated revenue

Bid RequestWin / MarkupTag LoadPostbackseCPM Model

HTML Template & Macros

Your HTML template will be loaded like:

<script src="https://your-server.com/widget.js"></script>
<script>window.init({subid: 'camp001__US__mobile', bid: 'bid-abc123-imp1'});</script>

Available macros (configured per campaign in the creative):

MacroDescriptionExample
${AUCTION_ID}SSP auction identifierabc123
${BID_ID}DigiKube bid identifierbid-abc123-imp1
${CAMPAIGN_ID}Campaign ID69b6bd32...
${DEVICE_TYPE}Resolved device typemobile, tablet, desktop
${GEO_COUNTRY}User's country codeUS, GB, DE
${SUBID}Auto-built dimension stringcampId__US__mobile
${AUCTION_IMP_ID}Impression identifierimp1
${CREATIVE_ID}Creative IDcr-001
${SSP_ID}SSP endpoint identifier0cd5d3d0e217
${BID_PRICE}Bid price CPM2.50
${SITE_DOMAIN}Publisher domainexample.com
${SITE_DOMAIN_ENC}Publisher domain (URL-encoded)example.com
${DEVICE_IP}Device IP address203.0.113.1
${DEVICE_UA}User agent stringMozilla/5.0...
${DEVICE_UA_ENC}User agent (URL-encoded)Mozilla%2F5.0...
${PAGE_URL}Full page URLhttps://example.com/page
${PAGE_URL_ENC}Full page URL (URL-encoded)https%3A%2F%2Fexample.com%2Fpage
${AUCTION_ID_ENC}Auction ID (URL-encoded)auc-abc123
${USER_ID}User identifieruser-123
${TIMESTAMP}Unix timestamp1773583556
${RANDOM}Cache buster482917

Two template syntaxes: $${MACRO} for bid-time context (used in HTML templates and content field values). {{field}} for structured content fields (used in SSP output templates).

Click Redirect Tracking

DigiKube can wrap creative click URLs through a server-side redirect for accurate first-party click counting. Configure the mode per campaign under Tracking → Click Tracking.

Click Tracking Modes

ModeDescription
noneNo click tracking. Click URL passed through as-is.
redirectClick URL is wrapped through our /click endpoint. Server records a click event before forwarding the user. This is the source of truth for click counts.
vendorClick tracking is handled by vendor postbacks (/pb/click). Vendor-fired postbacks are promoted to the source of truth for click attribution.

Click Redirect Endpoint

When redirect mode is active, click URLs are automatically wrapped at bid time. The endpoint:

GET https://rtb.dkadx.com/click?b={bid_id}&url={encoded_destination_url}
ParamRequiredDescription
bYesBid ID — used to record the click event and attribute to the campaign
urlYesURL-encoded destination URL — user is forwarded here after click is recorded

The ${CLICK_URL} Macro

Use the ${CLICK_URL} macro in your HTML template to reference the creative's click URL. When the campaign's click tracking mode is redirect, this macro is automatically substituted with the wrapped redirect URL. Otherwise it resolves to the raw destination URL.

Example creative template:

<a href="${CLICK_URL}">
  <img src="https://cdn.example.com/banner.jpg">
</a>

Set the click URL in the creative settings. S2S campaigns: click URLs extracted from vendor responses are automatically wrapped when redirect mode is active — no template changes needed.

Postback Pixels

Fire these HTTP GET requests from your ad server (server-side). All endpoints return a 1x1 transparent GIF.

impImpression Estimate

Fire on ad load (when your tag renders). Use an estimated revenue-per-click or eCPM value.

https://rtb.dkadx.com/pb/imp?b={bid_id}&v={estimated_rpc}
clickClick

Fire on user click. Use your measured revenue-per-click value.

https://rtb.dkadx.com/pb/click?b={bid_id}&v={rpc_value}
convConversion

Fire on conversion (lead, install, purchase). Use your CPA value. Optional ts param for late conversions.

https://rtb.dkadx.com/pb/conv?b={bid_id}&v={cpa_value}&ts={iso8601}

Parameters

ParamRequiredDescription
bYesThe bid ID — passed via ${BID_ID} macro in your tag
vYesRevenue value in USD (e.g., 0.50 for $0.50 RPC)
tsNoConversion timestamp (ISO 8601) — for late conversions only, /pb/conv endpoint

SubID Format

The subid parameter encodes campaign dimensions for revenue reporting and bid optimization.

Format

{campaign_id}__{dim1}__{dim2}

Delimiter

__ (double underscore)

Order

Campaign ID always first

Examples:

No dimensions69b6bd32
Geo only69b6bd32__US
Geo + device69b6bd32__US__mobile

Revenue Reports (Optional Calibration)

For maximum bid accuracy, configure a daily report endpoint per campaign. DigiKube polls your endpoint daily with ?date=YYYYMMDD and calibrates its eCPM model with final approved revenue figures.

Expected response format (JSON array):

[
  {
    "subid":        "69b6bd32__US__mobile",
    "revenue":      150.00,
    "clicks":       200,
    "impressions":  50000,
    "date":         "2026-03-16"
  }
]

Configure the report URL in the campaign settings. DigiKube reconciles approved revenue against postback estimates and adjusts bid shading accordingly.

Partner Stats API

Supply partners can query stats about their traffic via a dedicated API endpoint. Authentication uses the SSP endpoint_id as the API key.

GET https://stats.dkadx.com/api/stats?key={endpoint_id}&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&breakdown=DATE&metrics=BID_REQUESTS,BIDS,WINS,IMPRESSIONS,GROSS_REVENUE

Available Metrics:

MetricDescription
BID_REQUESTSTotal bid requests received from this SSP
BIDSBid responses sent back
WINSAuctions won
IMPRESSIONSConfirmed ad renders
GROSS_REVENUETotal revenue (sum of win prices)
AVG_BID_PRICEAverage bid CPM
WIN_RATEWins / Bids ratio

Breakdown options: DATE (daily) or HOUR (hourly). Max date range: 31 days. Auth via query param key= or header Authorization: Bearer.

Native Ads

Structured creatives can serve both banner and native formats. The SSP defines output templates that render creative content into the required format. Templates use {{field}} for content fields and ${MACRO} for bid-time context.

Structured Content Fields

FieldRequiredDescription
{{title}}YesAd headline
{{description}}NoBody text
{{image_url}}NoMain image URL
{{icon_url}}NoSmall icon/logo URL
{{click_url}}YesLanding page (supports ${MACRO} substitution)
{{sponsored_by}}NoAdvertiser name
{{cta}}NoCall to action text (e.g., "Shop Now")

SSP Output Template Examples

Example 1: Simple native (title + click)

{"native":{"ver":"1.1","link":{"url":"{{click_url}}"},"assets":[{"id":1,"title":{"text":"{{title}}"}}]}}

Example 2: Full native (title + image + description + sponsored)

{"native":{"ver":"1.1","link":{"url":"{{click_url}}"},"assets":[{"id":1,"title":{"text":"{{title}}"}},{"id":2,"img":{"url":"{{image_url}}","w":300,"h":250}},{"id":3,"data":{"type":2,"value":"{{description}}"}},{"id":4,"data":{"type":1,"value":"{{sponsored_by}}"}}],"eventtrackers":[{"event":1,"method":1,"url":"https://your-tracker.com/imp?id=${BID_ID}"}]}}

Example 3: Banner from structured content

<div style="width:300px;height:250px;position:relative">
  <a href="{{click_url}}" target="_blank">
    <img src="{{image_url}}" width="300" height="250">
    <div style="position:absolute;bottom:0;background:rgba(0,0,0,0.7);color:#fff;padding:8px;width:100%;box-sizing:border-box">
      <strong>{{title}}</strong><br>
      <small>{{sponsored_by}} · {{cta}}</small>
    </div>
  </a>
</div>

Note: For native ads, impression tracking must use burl (server-side), not ADM pixel (cannot append HTML to JSON). Configure this in the SSP settings.

Testing Your Integration

1

Verify postbacks are received

Use the Postback Log page in the dashboard to confirm events arrive and are attributed correctly.

2

Fire a test postback with curl

curl "https://rtb.dkadx.com/pb/click?b=test-bid-001&v=0.50"
3

Confirm event appears in the log

Events should appear in the Postback Log within 60 seconds of being fired.