Ad Preview & Debug Mode
Test backend (SSR) ad integrations using query string parameters and the x-adp-event-track-id header — without running live campaigns
Ad Preview & Debug Mode
Backend (SSR) integrations do not have the DL API SDK running in the browser during the request, so standard client-side ad preview tools do not apply. Instead, Ring DAS supports a set of query string parameters that your backend reads from the page URL and forwards to the bidder. This lets you preview specific creatives, override targeting context, and trace the full ad event pipeline — all without running a live campaign.
Applies to all backend (SSR) formats: Sponsored Single Tile, Sponsored Product Slider, Brand Store, Branded Products. The mechanism is identical across all formats — only the
adbetaslot name differs per format.
Query String Parameters
Add these parameters to the page URL. Your backend reads them and forwards them to the bidder request.
| Parameter | Effect | Example |
|---|---|---|
adbeta | Forces the bidder to return a specific creative for preview. Format: l{lineitem_id}!slot.{slot_name} | ?adbeta=l1234567!slot.product-tile |
test_area | Overrides the site.ext.area value in the bidder request | ?test_area=SEARCH |
test_site | Overrides the site.id value in the bidder request | ?test_site=DEMO_PAGE |
test_kwrd | Adds test keywords to the site.ext.kwrd targeting parameter | ?test_kwrd=smartphone+samsung |
Backend Implementation
Extract the debug parameters from the incoming page URL and apply them to the bidder request:
function buildBidderRequest(pageContext, debugParams = {}) {
// Base site/area from page context
let siteId = pageContext.siteId; // e.g., 'DEMO_PAGE'
let area = pageContext.area; // e.g., 'SEARCH'
// Override with debug params if present in page URL
if (debugParams.test_site) siteId = debugParams.test_site;
if (debugParams.test_area) area = debugParams.test_area;
const requestBody = {
id: crypto.randomUUID(),
imp: [ /* ... standard imp entries ... */ ],
site: {
id: siteId,
ext: {
area: area,
// Inject test keywords if present
...(debugParams.test_kwrd && { kwrd: debugParams.test_kwrd }),
}
},
user: { /* ... standard user params ... */ },
ext: {
/* ... standard ext params ... */
// Force specific creative for preview
...(debugParams.adbeta && { adbeta: debugParams.adbeta }),
},
regs: { /* ... standard regs ... */ },
tmax: 1000
};
return requestBody;
}Extracting debug params from the page URL:
// Read from incoming request (e.g., Express.js)
const debugParams = {
adbeta: req.query.adbeta || null,
test_area: req.query.test_area || null,
test_site: req.query.test_site || null,
test_kwrd: req.query.test_kwrd || null,
};
const requestBody = buildBidderRequest(pageContext, debugParams);Debug Tracking: x-adp-event-track-id
The X-ADP-EVENT-TRACK-ID HTTP header enables end-to-end tracking of the entire ad event pipeline — from the initial bid request, through impression and click, all the way to conversion. Pass a unique value per debug session to trace all related events in Ring DAS systems.
async function fetchAd(requestBody, incomingHeaders = {}) {
const encodedData = encodeURIComponent(JSON.stringify(requestBody));
const bidderHeaders = {};
// Forward tracking header if present in the incoming page request
const trackId = incomingHeaders['x-adp-event-track-id'];
if (trackId) {
bidderHeaders['X-ADP-EVENT-TRACK-ID'] = trackId;
}
const response = await fetch(
`${BIDDER_URL}?data=${encodedData}`,
{ headers: bidderHeaders }
);
if (response.status === 204) return null;
return response.json();
}Usage: Set a unique, descriptive value when debugging a specific request flow:
x-adp-event-track-id: debug-search-tile-2025-02-16-ticket-1234
Use this ID to trace all related events across Ring DAS systems.
Preview URL Examples
Preview a specific creative:
https://your-shop.com/search?q=smartphones&adbeta=l1234567!slot.product-tile
Override area and site for testing:
https://your-shop.com/search?q=smartphones&test_site=DEMO_PAGE&test_area=SEARCH
Combine creative preview with keyword testing:
https://your-shop.com/search?q=smartphones&adbeta=l1234567!slot.product-tile&test_kwrd=smartphone+samsung
Full debug session with tracking:
curl -H "x-adp-event-track-id: debug-session-42" \
"https://your-shop.com/search?q=smartphones&adbeta=l1234567!slot.product-tile"
Related
- Sponsored Single Tile - Backend SSR integration for search and category pages
- Sponsored Product Slider - Backend SSR integration for product sliders
- Brand Store (Web) - Backend SSR integration for product detail pages
- Branded Products - Backend SSR integration for homepage banners
Updated about 14 hours ago
