Skip to main content
GUIDE · QUORA ADS8 min read

Quora Ads Conversion API setup

A production guide for sending TrackLayer server-side events to Quora Ads with fresh OAuth2 bearer tokens, stable click identity, hashed user data, clean revenue payloads, and dashboard-based validation before you trust campaign optimization.

Context

Why Quora Ads CAPI

Quora traffic often converts on a longer path than a standard impulse click. A user can read an answer, click an ad, compare alternatives, return later, and convert after a form handoff, payment redirect, or sales follow-up. Browser-only measurement loses too much of that path once ad blockers, consent filters, or short-lived storage get involved.

Server-side delivery closes part of that gap. TrackLayer can take a confirmed business action from your backend, attach the saved Quora click context, add permitted hashed identifiers, and send a durable conversion payload directly to Quora. That gives Quora Ads a cleaner optimization signal and gives your team an event trail you can inspect before budget decisions drift away from real purchase truth.

Requirements

Prerequisites

01

Quora Ads account with access to the production pixel_id and conversion settings for the ad account you are measuring.

02

OAuth2 client credentials plus a long-lived refresh_token stored as TrackLayer secrets for server-side token refresh.

03

TrackLayer destination enabled for Quora Ads with canonical events mapped for Purchase, Lead, CompleteRegistration, AddToCart, and InitiateCheckout.

04

Landing pages that preserve the incoming qsrc query parameter long enough to store qclid in a first-party cookie or session record.

05

Consent handling that allows you to forward hashed email, hashed phone, IP address, and user agent only when your policy permits it.

Build

Step-by-step setup

Build the integration in clear layers: refresh auth, capture click identity, normalize user data, assemble the event array, dispatch to Quora, and prove the full path in TrackLayer before enabling broader campaign optimization.

Step 1

Refresh the Quora bearer token on the server

Quora Ads API calls should never depend on a browser token. TrackLayer should exchange the stored refresh_token for a fresh access token inside a backend worker, cache the short-lived bearer until expiry, and stop the batch if token refresh fails. That keeps conversion dispatch deterministic and prevents partial event delivery with stale authorization.

{
  "destination": "quora_ads",
  "auth": {
    "type": "oauth2",
    "client_id": "quora_client_id",
    "client_secret": "quora_client_secret",
    "refresh_token": "quora_refresh_token",
    "grant_type": "refresh_token"
  },
  "token_cache_ttl_seconds": 3300
}
Step 2

Capture qclid from the landing qsrc parameter

Quora traffic can arrive with qsrc in the landing URL while the destination worker expects qclid. Normalize that at collection time: read qsrc, persist it as qclid, and attach it to the session before redirects, single-page app route changes, or checkout handoff remove the query string. Keep the identifier first-party and scoped to the site so purchase events can reuse it later.

const params = new URLSearchParams(window.location.search);
const qsrc = params.get("qsrc");

if (qsrc) {
  document.cookie =
    "qclid=" + encodeURIComponent(qsrc) +
    "; Path=/; Max-Age=2419200; SameSite=Lax; Secure";
}
Step 3

Normalize and hash user identifiers before dispatch

Quora matching improves when TrackLayer sends stable hashed identifiers along with click context. Normalize email by trimming and lowercasing. Normalize phone into digits with country code, then hash the final canonical string. Perform hashing inside the worker or backend route, not in browser code, and omit empty fields instead of sending blank or placeholder values.

import crypto from "node:crypto";

function sha256(value: string) {
  return crypto.createHash("sha256").update(value).digest("hex");
}

const normalizedEmail = "buyer@example.com".trim().toLowerCase();
const normalizedPhone = "15551234567";

const userData = {
  email: sha256(normalizedEmail),
  phone_number: sha256(normalizedPhone),
  client_ip_address: "203.0.113.42",
  client_user_agent: "Mozilla/5.0..."
};
Step 4

Build the Quora events array from TrackLayer actions

Translate TrackLayer canonical events into the Quora event contract before network dispatch. Each batch should send an events array where each item carries event_name, event_time, pixel_id, user_data, and custom_data. Use the original business action time, not queue execution time. For revenue events, custom_data should include value, currency, and order_id so Quora can report and optimize on real purchase value.

{
  "events": [
    {
      "event_name": "Purchase",
      "event_time": "2026-04-24T09:41:18Z",
      "pixel_id": "pxl_9e2a4f6c",
      "user_data": {
        "email": "6a6c26195c3682faa816966af789717c3bfa834eee6c599d667d2b3429c27cfd",
        "phone_number": "d6736136ea896c1b8e1b6d8c6f1d9a7f0a4ea0bca8a58d8a1f351f6f8a72d8f1",
        "client_ip_address": "203.0.113.42",
        "client_user_agent": "Mozilla/5.0...",
        "qclid": "qsrc_click_7f92c6"
      },
      "custom_data": {
        "value": 129.95,
        "currency": "USD",
        "order_id": "ord_10492"
      }
    }
  ]
}
Step 5

Post to the Quora Conversions API with stable event IDs

Dispatch the payload from a server route or queue worker to the Quora conversion endpoint with the fresh bearer token. Keep one stable event identifier per business action inside TrackLayer even if the Quora payload nests fields differently. That same identifier should also be used by the Quora pixel path when you run browser and server tracking together, so deduplication stays anchored to one purchase or lead.

POST https://api.quora.com/ads/v0/conversions
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json

{
  "events": [
    {
      "event_name": "GenerateLead",
      "event_time": "2026-04-24T09:45:02Z",
      "pixel_id": "pxl_9e2a4f6c",
      "user_data": {
        "email": "6a6c26195c3682faa816966af789717c3bfa834eee6c599d667d2b3429c27cfd",
        "client_ip_address": "203.0.113.42",
        "client_user_agent": "Mozilla/5.0...",
        "qclid": "qsrc_click_7f92c6"
      },
      "custom_data": {
        "order_id": "lead_9821",
        "currency": "USD",
        "value": 0
      }
    }
  ]
}
Step 6

Validate the destination in the TrackLayer dashboard

Use the TrackLayer dashboard before trusting Quora reporting. Send one controlled lead and one controlled purchase from a real landing session that includes qsrc. Confirm the event log shows qclid capture, hashed identifiers present, token refresh success, the outbound Quora payload, and the Quora API response. Only after that should you widen event coverage or attach the stream to bid optimization.

{
  "dashboard_checks": [
    "qsrc captured on landing and stored as qclid",
    "oauth refresh succeeded before dispatch",
    "email and phone hashed after normalization",
    "event_name mapped from canonical event",
    "custom_data contains value currency and order_id",
    "quora response marked accepted"
  ]
}
Contract

Event shape that Quora expects

Treat the payload as a strict contract, not a loose blob of analytics fields. The outer request is an events array. Each item should carry a Quora event_name, the true event_time, the correct pixel_id, user_data with permitted identifiers, and custom_data for commercial context. For purchase events, custom_data value, currency, and order_id are the core fields TrackLayer should preserve from the source order record.

In practice, the safest pattern is this: TrackLayer stores one canonical event with one stable internal identifier, then the Quora destination translates that canonical event into the Quora object shape. That lets you retry safely, inspect one source of truth in the dashboard, and keep deduplication aligned across browser and server paths.

{
  "events": [
    {
      "event_name": "CompleteRegistration",
      "event_time": "2026-04-24T10:03:44Z",
      "pixel_id": "pxl_9e2a4f6c",
      "user_data": {
        "email": "sha256_email",
        "phone_number": "sha256_phone",
        "client_ip_address": "203.0.113.42",
        "client_user_agent": "Mozilla/5.0...",
        "qclid": "qsrc_click_7f92c6"
      },
      "custom_data": {
        "order_id": "signup_8821",
        "currency": "USD",
        "value": 0
      }
    }
  ]
}
Validation

Testing in the TrackLayer dashboard

1

Landing capture

Open a landing URL with a test qsrc value, then confirm the session log shows qclid captured before any route change or checkout redirect.

2

Outbound payload

Trigger a lead or purchase and inspect the Quora destination event to confirm hashed identifiers, pixel_id, event_name, event_time, and custom_data are all present.

3

Response audit

Check the TrackLayer response panel for acceptance, validation warnings, and retry history before using the stream for budget or bid decisions.

Diagnostics

Troubleshooting

401 unauthorized or invalid bearer token

Refresh the OAuth2 access token from the saved refresh_token, verify client credentials, and confirm the worker is not reusing an expired token cache entry.

Events accepted in TrackLayer but not attributed in Quora

Check that qsrc was captured and stored as qclid on the original landing page, that the correct pixel_id is in the payload, and that event_time falls inside the Quora attribution window.

Low match quality or rejected user_data

Lowercase and trim email before hashing, normalize phone to digits with country code before hashing, omit empty identifiers, and forward the true client IP address and user agent from the browser request.

Duplicate purchase counts

Use one stable TrackLayer event identifier for the purchase, reuse it across retries and browser-side pixel delivery, and do not mint a new order_id or event id when the worker retries a failed request.

Go live

Final checklist

  • Production pixel_id confirmed in Quora Ads Manager.
  • OAuth2 client_id, client_secret, and refresh_token stored as server secrets.
  • Landing qsrc captured and persisted as qclid before redirects.
  • Canonical events mapped to Quora event_name values.
  • Email and phone normalized and SHA-256 hashed on the server.
  • custom_data includes value, currency, and order_id for purchase events.
  • TrackLayer dashboard shows accepted test events with the expected payload.
  • Retry logic preserves the same event identity across transient failures.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.