Quantcast
Datafly Signal delivers conversion events to Quantcast Measure server-to-server using the Conversion API. This augments the Quantcast Live Tag with reliable server-side conversions that are not affected by ad blockers or browser tracking prevention, and lets you report conversions that happen after a delay or off the website.
Prerequisites
Before configuring Quantcast in Signal, you need a Quantcast Measure account and your account P-Code.
Step 1: Find your P-Code (Account ID)
Your P-Code is the account identifier Quantcast uses to attribute events to your account. It is the same value as the qacct parameter in your Quantcast Live Tag (it looks like p-XXXXXXXXXXXXX).
- Sign in to your Quantcast Measure account.
- Open your account settings, or inspect your existing Live Tag on your site.
- Copy the
qacct/ P-Code value.
Step 2: Keep the Live Tag running (recommended)
The Conversion API is designed to augment the Live Tag, not replace it. The Live Tag captures the Quantcast browser token, which gives the highest match accuracy when you send server-side conversions. Keep the Live Tag deployed so Signal can link conversions back to web activity.
Signal can deliver conversions without a browser token by falling back to the visitor’s IP address and User-Agent, but match quality is higher when the browser token is present.
Configure in Signal
Configuration Fields
| Field | Required | Description |
|---|---|---|
p_code | Yes | Your Quantcast account P-Code (e.g. p-XXXXXXXXXXXXX). Sent as the a query parameter on every request. |
Management UI Setup
- Go to Integrations > Add Integration > Quantcast.
- Choose the Default preset (page views plus core conversions).
- Enter your
p_code. - Select consent categories (typically
advertisingormarketing). - Click Save.
API Endpoint
POST https://pixel.quantserve.com/conversion?a={p_code}There is no API key. Requests are scoped to your account by the a query parameter (your P-Code). The request body is a JSON array of conversion objects, sent with Content-Type: application/json.
Identity Signals
Quantcast matches each server-side conversion to a user using the signals below. The more you provide, the better the match.
| Signal | Field | Description |
|---|---|---|
| Browser token | user.token | The Quantcast browser token captured by the Live Tag (__qca). Highest match accuracy. Sent automatically when available. |
| External ID | user.external_id | Signal’s anonymous_id, sent raw (not hashed) as a stable cross-session identifier. |
user.email | SHA-256 hashed (lowercased and trimmed first). Raw email is rejected by the API. | |
| IP address | user.client_ip | Visitor’s IP, forwarded from the original request. Required when no browser token is present. |
| User-Agent | user.client_user_agent | Visitor’s User-Agent, forwarded from the original request. Required when no browser token is present. |
All email hashing is performed server-side by Signal before the data leaves your infrastructure. Quantcast only ever receives the SHA-256 hash.
How to send user data
Call datafly.identify() when a user logs in, registers, or submits a form:
datafly.identify("user-123", {
email: "jane.doe@example.com"
});Signal normalises and hashes the email before sending it to Quantcast as user.email.
Consent
The Quantcast Conversion API has no per-event consent field. Signal enforces consent upstream: when a visitor has not granted marketing consent, the event is dropped by the pipeline and never reaches Quantcast. Set the integration’s consent categories (typically advertising) so this gating applies.
Event Mapping
Default preset
| Signal event | Quantcast event name |
|---|---|
page | Page View |
Product Viewed | Product Viewed |
Lead Generated | Lead |
Signed Up | Sign Up |
Order Completed | Order Completed |
Order Refunded | Refund |
Conversion details map as follows: properties.revenue → revenue (a plain numeric value in your account’s billing currency — there is no currency field on this API), properties.order_id → orderid, and properties.category → product_category. The page URL and referrer are sent on every event as url and referer, and the event time is sent as a Unix epoch timestamp in time.
To customise, edit the integration’s Field Mappings in the Management UI.
Example: Purchase event
Datafly.js call:
datafly.track("Order Completed", {
order_id: "ORD-001",
revenue: 129.99,
category: "apparel"
});Quantcast Conversion API payload sent by Signal:
[
{
"name": "Order Completed",
"time": 1717689600,
"url": "https://example.com/checkout/confirmation",
"referer": "https://example.com/checkout/payment",
"orderid": "ORD-001",
"revenue": 129.99,
"product_category": "apparel",
"user": {
"token": "abc123…",
"external_id": "a1b2c3d4e5f6",
"email": "5e88…<sha256>…",
"client_ip": "203.0.113.50",
"client_user_agent": "Mozilla/5.0 …"
}
}
]The body is always a JSON array, even for a single conversion. Signal batches multiple conversions into one request automatically.
Testing
- Trigger a conversion event on your website (e.g. complete a test order).
- In Signal’s event debugger, confirm the event is delivered to Quantcast and the response is HTTP 200.
- Confirm the outgoing payload is a JSON array, that
user.emailis a SHA-256 hash (never raw), and thatrevenuecarries no currency symbol. - In your Quantcast Measure account, confirm the conversion appears against your P-Code (allow time for processing).
Quantcast rejects unhashed email addresses. If you map a raw email field directly, the request will fail — always rely on Signal’s built-in SHA-256 hashing for user.email.
Troubleshooting
| Problem | Solution |
|---|---|
Events rejected with 400 | Check that each conversion has a name and a user object with either a token or both client_ip and client_user_agent. Confirm user.email is hashed, not raw. |
Events rejected with 401 / 403 | The P-Code (a query parameter) is missing or incorrect. Verify it matches your Live Tag qacct. |
| Low match rate | Keep the Quantcast Live Tag deployed so the browser token (__qca) is available, and send email via datafly.identify(). IP + User-Agent alone match less precisely. |
| Revenue looks wrong | revenue has no currency field — it is interpreted in your account’s billing currency. Send the numeric value only, with no symbol. |
| No events arriving | Confirm marketing consent is granted — events without consent are dropped upstream and never sent to Quantcast. |