Prooflytics + Quora Ads: B2B Lead Attribution from Intent-Based Advertising to Closed Deal
Quora Ads is an intent-based advertising platform where ads are shown to users who are actively asking specific professional questions. For B2B SaaS, this is highly targeted traffic: if your product solves a problem that has an active Quora thread, your ad reaches exactly the person searching for a solution right now.
The problem with standard Quora Ads attribution: Quora Pixel records a conversion when a form is submitted or a user lands on the Thank You page. But in B2B, deal cycles run 30-90 days. The Pixel sees “lead created,” but has no idea whether that lead converted into a closed deal a month later. Quora reports on lead CPA, while the real CPA of a closed deal (CPO) remains unknown.
Prooflytics solves this: it connects the Quora click ID (qclid) to CRM data, tracks progress through the pipeline, and sends a purchase event (or a custom “deal_won”) back to Quora Conversions API when a deal closes.
Quora qclid is a unique click identifier that Quora appends to the URL when a user clicks an ad. It is the equivalent of gclid (Google) and fbclid (Meta). It is captured on the first visit and stored in the CRM for later attribution.
Attribution Architecture
User clicks a Quora ad
-> URL: yoursite.com/demo?qclid=AaBbCcDd...
-> Pixel JS + custom code save qclid to cookie + localStorage
Lead form submission
-> qclid passed as a hidden field
-> Kommo/HubSpot: deal created, qclid stored in a custom field
Prooflytics
-> Periodically reads deal statuses from CRM
-> On Closed Won: finds deals with qclid
-> Quora Conversions API: event "purchase" with qclid
-> Quora reports the real CPO
Capturing qclid on the Website
// Add to all landing pages
(function() {
var params = new URLSearchParams(window.location.search);
var qclid = params.get("qclid");
if (qclid) {
localStorage.setItem("qclid", qclid);
document.cookie = "qclid=" + qclid + ";path=/;max-age=2592000"; // 30 days
}
})();
// On form submission
function getQclid() {
var params = new URLSearchParams(window.location.search);
return params.get("qclid") || localStorage.getItem("qclid") || getCookie("qclid") || "";
}
function getCookie(name) {
var match = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
return match ? match[2] : "";
}
// Add a hidden input to the lead form
// <input type="hidden" name="qclid" id="field_qclid" />
document.getElementById("field_qclid").value = getQclid();
Sending qclid to Quora Conversions API on Deal Close
import requests, os, hashlib, time
from flask import Flask, request, jsonify
app = Flask(__name__)
QUORA_PIXEL_ID = os.environ["QUORA_PIXEL_ID"]
QUORA_ACCESS_TOKEN = os.environ["QUORA_ACCESS_TOKEN"]
KOMMO_SUBDOMAIN = os.environ["KOMMO_SUBDOMAIN"]
KOMMO_TOKEN = os.environ["KOMMO_ACCESS_TOKEN"]
KOMMO_CF_QCLID = int(os.environ["KOMMO_CF_QCLID_ID"])
CLOSED_WON_ID = int(os.environ["KOMMO_CLOSED_WON_ID"])
QUORA_API_BASE = "https://api.quora.com/conversion/pixel/log"
KOMMO_BASE = f"https://{KOMMO_SUBDOMAIN}.kommo.com/api/v4"
KOMMO_HDR = {"Authorization": f"Bearer {KOMMO_TOKEN}", "Content-Type": "application/json"}
def sha256_email(email: str) -> str:
return hashlib.sha256(email.strip().lower().encode()).hexdigest()
def get_lead_qclid_and_email(lead_id: int) -> tuple[str, str]:
r = requests.get(
f"{KOMMO_BASE}/leads/{lead_id}",
headers=KOMMO_HDR,
params={"with": "contacts,custom_fields_values"},
)
lead = r.json()
qclid = ""
for cf in lead.get("custom_fields_values", []) or []:
if cf.get("field_id") == KOMMO_CF_QCLID:
vals = cf.get("values", [])
if vals:
qclid = vals[0].get("value", "")
break
email = ""
contacts = lead.get("_embedded", {}).get("contacts", [])
if contacts:
rc = requests.get(
f"{KOMMO_BASE}/contacts/{contacts[0]['id']}",
headers=KOMMO_HDR,
params={"with": "custom_fields_values"},
)
for cf in rc.json().get("custom_fields_values", []) or []:
if cf.get("field_code") == "EMAIL":
vals = cf.get("values", [])
if vals:
email = vals[0].get("value", "")
break
return qclid, email
def send_quora_conversion(qclid: str, email: str, revenue: float):
payload = {
"pixel_id": QUORA_PIXEL_ID,
"event_name": "Purchase",
"event_id": f"deal_won_{qclid}_{int(time.time())}",
"event_time": int(time.time()),
"user_data": {
"email": [sha256_email(email)] if email else [],
"click_id": qclid,
},
"custom_data": {
"currency": "USD",
"value": round(revenue, 2),
},
}
r = requests.post(
QUORA_API_BASE,
headers={"Authorization": f"Bearer {QUORA_ACCESS_TOKEN}", "Content-Type": "application/json"},
json=[payload],
)
return r.status_code, r.text
@app.route("/webhooks/kommo", methods=["POST"])
def kommo_webhook():
data = request.json or {}
for lead_data in data.get("leads", {}).get("status", []):
lead_id = lead_data.get("id")
new_status = lead_data.get("status_id")
if new_status != CLOSED_WON_ID:
continue
r_lead = requests.get(f"{KOMMO_BASE}/leads/{lead_id}", headers=KOMMO_HDR)
revenue = float(r_lead.json().get("price") or 0)
qclid, email = get_lead_qclid_and_email(lead_id)
if not qclid:
continue # no Quora click - skip
status, resp = send_quora_conversion(qclid, email, revenue)
requests.post(
f"{KOMMO_BASE}/notes",
headers=KOMMO_HDR,
json=[{
"entity_id": lead_id,
"entity_type": "leads",
"note_type": "common",
"params": {"text": f"Quora Conversions API: Purchase event sent. Status: {status}. qclid: {qclid}"},
}],
)
return jsonify({"status": "ok"}), 200
Custom Event vs Purchase
Quora supports standard events (Purchase, Lead, Complete Registration) as well as custom ones. For B2B, it is better to separate them:
Lead- when a deal is created in the CRM (MQL)Purchase- on Closed Won (Revenue)
This gives Quora visibility into both stages of the funnel and allows it to optimize campaigns toward real conversions.
The Role of Prooflytics in This Setup
Prooflytics acts as attribution middleware: a single store for touch data (qclid, fbclid, gclid, UTM) from all advertising channels, synchronized with the CRM. When a deal closes, Prooflytics automatically identifies sources using a multi-touch model and fires events to each ad channel via the corresponding Conversions API.
The example above is a simplified single-channel implementation (Quora only). The full multi-channel attribution cycle - Quora + Meta + LinkedIn + Google simultaneously - is covered in the article Prooflytics + Amazon DSP.
Who This Is For
B2B SaaS companies whose target audience is actively asking professional questions on Quora - in IT, SaaS, marketing, sales, and HR. Quora Ads work best when your product answers a specific question rather than just targeting demographics. For founders selling into international markets: English-language Quora has a substantial audience of IT professionals and managers from the US and EU.
Frequently Asked Questions
How long should qclid be stored in the CRM?
qclid is valid for Quora Conversions API for 28 days from the click (equivalent to the attribution window used by Google and Meta). If a deal closes after that period, the conversion will not be attributed correctly by Quora. Store qclid indefinitely: even if the API attribution window has passed, the data remains valuable for internal analytics.
Does Quora Conversions API require domain verification?
Yes, similar to Meta. In Quora Ads Manager: Pixels -> Setup -> Verify Domain. You need to add a meta tag or a DNS record. Without verification, Conversions API may reject events.
How do Quora Ads compare to LinkedIn Ads on CPL for B2B?
Quora CPL is typically lower than LinkedIn ($20-50 vs $80-200 for B2B SaaS), but conversion to a closed deal may be lower due to less precise targeting. The optimal strategy is to use Quora for top-of-funnel (awareness + MQL) and LinkedIn for lower-funnel (director and C-level retargeting). Multi-channel attribution through Prooflytics will show the real ROI of each channel.
Summary
Prooflytics + Quora Ads closes the attribution loop:
- Capture
qclidon the landing page -> save to cookie + localStorage qclidin a hidden form field -> CRM custom field- Closed Won webhook ->
send_quora_conversion(qclid, email, revenue) event_name: Purchase,user_data.click_id: qclid, SHA256 email- Custom
Leadevent on deal creation for MQL-level campaign optimization
If you need help setting up multi-channel attribution with Quora Ads and other platforms through Prooflytics, describe your requirements to the Exceltic.dev team.