Prooflytics + Amazon DSP: Display Ad Attribution to Closed B2B Deal
Amazon DSP (Demand-Side Platform) is a programmatic display advertising platform with access to Amazon audiences and premium inventory. B2B companies use Amazon DSP for retargeting Amazon Business buyers and targeting behavioral segments from Amazon data (in-market audiences, lifestyle segments). Standard Amazon DSP metrics are impressions, clicks, DPV (Detail Page Views), and Purchase Rate. The real question is: how many closed B2B deals did an Amazon DSP campaign actually generate, and what is the CAC?
Amazon Attribution API lets you create tracking tags for campaigns running outside of Amazon (including DSP). When a user clicks an ad, they are routed through an Amazon Attribution redirect that captures a click ID. Prooflytics intercepts this parameter, links it to the user’s registration, and when a deal is closed in the CRM it sends a conversion event back to the Amazon Advertising API.
Amazon Attribution is Amazon’s conversion tracking tool for advertisers. It lets you measure the impact of off-Amazon advertising on Amazon sales. In a B2B SaaS context it is used to track how DSP campaigns influence CRM conversions.
Technical Architecture
Amazon DSP campaign: ad with Amazon Attribution tracking URL
-> User clicks -> redirect through Amazon Attribution
-> Landing page: ?amzn_ref=XXXXXXXXX (Attribution tag parameter)
-> Prooflytics JS: capture amzn_ref + email at registration
Prooflytics backend
-> Store: {email -> amazon_attribution_tag, campaign_id, timestamp}
User registers in CRM
-> Prooflytics enriches lead with Amazon Attribution data
Deal closed (CRM webhook)
-> Prooflytics -> Amazon Advertising API: POST /conversion-event
-> Calculate CAC: DSP spend / closed deals
Getting an Amazon Attribution Tag
Before tracking can begin, you need to create an Attribution Tag in Amazon Advertising:
import requests, os
AA_CLIENT_ID = os.environ["AMAZON_ADVERTISING_CLIENT_ID"]
AA_CLIENT_SECRET = os.environ["AMAZON_ADVERTISING_CLIENT_SECRET"]
AA_REFRESH_TOKEN = os.environ["AMAZON_ADVERTISING_REFRESH_TOKEN"]
AA_PROFILE_ID = os.environ["AMAZON_ADVERTISING_PROFILE_ID"]
def get_amazon_access_token() -> str:
r = requests.post(
"https://api.amazon.com/auth/o2/token",
data={
"grant_type": "refresh_token",
"refresh_token": AA_REFRESH_TOKEN,
"client_id": AA_CLIENT_ID,
"client_secret": AA_CLIENT_SECRET,
},
)
return r.json()["access_token"]
AA_BASE = "https://advertising-api.amazon.com"
def get_aa_headers() -> dict:
token = get_amazon_access_token()
return {
"Authorization": f"Bearer {token}",
"Amazon-Advertising-API-ClientId": AA_CLIENT_ID,
"Amazon-Advertising-API-Scope": AA_PROFILE_ID,
"Content-Type": "application/json",
}
def create_attribution_publisher(name: str) -> str:
r = requests.post(
f"{AA_BASE}/attribution/publishers",
headers=get_aa_headers(),
json={"name": name},
)
return r.json().get("publisherId", "")
def create_attribution_tag(publisher_id: str, campaign_name: str, landing_url: str) -> str:
# Create a tracking tag for a specific campaign
r = requests.post(
f"{AA_BASE}/attribution/tags/macro",
headers=get_aa_headers(),
json={
"publisherId": publisher_id,
"adGroupId": campaign_name,
"creativeId": "creative-001",
"advertiserName": "Your Company",
"landingPageUrl": landing_url,
},
)
data = r.json()
return data.get("tags", [{}])[0].get("tag", "")
Implementation: Capturing Amazon Attribution on the Landing Page
The Prooflytics JS snippet on the landing page intercepts the Amazon Attribution parameter:
(function() {
var API_KEY = 'YOUR_PROOFLYTICS_KEY';
var API_BASE = 'https://api.prooflytics.io/v1';
// Amazon Attribution uses the amzn_ref parameter or a custom parameter
function getAmazonAttrParam() {
var params = new URLSearchParams(window.location.search);
return params.get('amzn_ref') || params.get('amazon_attr') || params.get('aa_tag') || '';
}
var amazonAttr = getAmazonAttrParam();
if (amazonAttr) {
sessionStorage.setItem('prooflytics_amazon_attr', amazonAttr);
sessionStorage.setItem('prooflytics_amazon_ts', Date.now().toString());
}
window.prooflyticsTrackAmazon = function(email) {
var attr = sessionStorage.getItem('prooflytics_amazon_attr')
|| localStorage.getItem('prooflytics_amazon_attr');
if (!attr || !email) return;
navigator.sendBeacon(
API_BASE + '/attribution/amazon',
JSON.stringify({api_key: API_KEY, email: email, amazon_attr: attr})
);
};
})();
Implementation: Sending the Conversion to the Amazon Advertising API
import time
from flask import Flask, request, jsonify
app = Flask(__name__)
# in-memory store (use Redis/PostgreSQL in production)
attribution_store = {}
@app.route("/v1/attribution/amazon", methods=["POST"])
def receive_amazon_attribution():
data = request.json or {}
email = data.get("email", "")
amazon_attr = data.get("amazon_attr", "")
if not email or not amazon_attr:
return jsonify({"error": "missing fields"}), 400
attribution_store[email] = {
"amazon_attr": amazon_attr,
"received_at": int(time.time()),
}
return jsonify({"status": "ok"}), 200
def send_amazon_conversion(email: str, deal_value: float, order_id: str):
attr = attribution_store.get(email)
if not attr:
return
hdrs = get_aa_headers()
# Amazon Attribution Conversions API
payload = {
"conversions": [{
"eventType": "PURCHASE",
"timestamp": int(time.time() * 1000),
"orderId": order_id,
"currencyCode": "USD",
"value": deal_value,
"unitsSold": 1,
"conversionDefinitionId": attr["amazon_attr"],
}]
}
requests.post(
f"{AA_BASE}/attribution/conversions",
headers=hdrs,
json=payload,
)
@app.route("/crm/deal-won", methods=["POST"])
def deal_won_webhook():
data = request.json or {}
email = data.get("contact_email", "")
deal_id = data.get("deal_id", "")
deal_value = float(data.get("deal_value", 0))
if email:
send_amazon_conversion(email, deal_value, deal_id)
return jsonify({"status": "ok"}), 200
Amazon DSP in B2B: Audiences and Use Cases
Amazon DSP provides access to audiences that are unavailable in Google or Meta:
- Amazon Business buyers - buyers on Amazon Business in your product category
- In-market audiences - users actively searching for products in your category
- Lookalike audiences - users similar to your existing customers
For B2B SaaS companies with long sales cycles, Amazon DSP is especially effective as an assist channel (mid-funnel) - reminding your product to audiences that have already interacted with your site or that resemble existing customers.
What the Marketer Sees in Prooflytics
After setting up the integration, Prooflytics will show:
- Amazon DSP CAC - spend / closed deals attributed to Amazon
- Assist attribution - how many closed deals had a touchpoint with Amazon DSP
- Funnel - click -> registration -> qualified lead -> closed deal from DSP
- Comparison - Amazon DSP CAC vs Google Ads CAC vs LinkedIn Ads CAC
Real-World Case
A B2B SaaS company with a $12,000/month Amazon DSP budget. Standard Amazon DSP metrics showed a ROAS of 3.2x (based on DPV). After integrating with Prooflytics: out of 890 clicks through Attribution, only 7 became closed deals. CAC = $1,714 vs $890 from Google Ads. They reallocated budget: cut Amazon DSP by $4k and increased LinkedIn spend (better CAC for their ICP).
Who This Is Relevant For
Enterprise-oriented B2B SaaS companies with $5k+ per month in DSP spend and a long sales cycle. Amazon DSP works best for companies whose customers buy on Amazon Business (software, hardware, office supplies in adjacent segments).
A similar approach is described for Prooflytics + Criteo and Prooflytics + The Trade Desk type DSP platforms.
Frequently Asked Questions
Do you need to be an Amazon seller to use Amazon DSP?
No. Amazon DSP is available to non-endemic advertisers - companies that do not sell on Amazon. B2B SaaS companies can use DSP to target Amazon audiences without having a product listing on Amazon. Some Attribution features may be restricted for non-endemic advertisers - check with your Amazon Account Manager for details.
How does Amazon Attribution work for campaigns running outside of Amazon?
Amazon Attribution provides a tracking URL with a unique tag. This URL is used as the destination in your Google Ads, LinkedIn, or Amazon DSP campaigns. When a user clicks through, Amazon records the click and tracks subsequent conversions on Amazon. For B2B SaaS companies not selling on Amazon, the Amazon Advertising Conversions API is used to send off-Amazon conversions.
What is the minimum budget for Amazon DSP?
Managed Service (through the Amazon Advertising team): minimum $35,000 per month. Self-Service through DSP Console: minimum varies by region, typically $10,000-15,000 per month. For teams with smaller budgets, Amazon Attribution can still be used purely as a tracking layer for other channels.
Summary
Prooflytics + Amazon DSP - display ad attribution to closed deal:
- Amazon Attribution tracking URL ->
amzn_refparameter on the landing page - JS: capture
amzn_ref+ email at registration -> Prooflytics API - Amazon Advertising API: OAuth2 Refresh Token to obtain access token
- On closed_won in CRM:
POST /attribution/conversionswith deal value - Dashboard: Amazon DSP CAC vs other channels, assist attribution
If you want to see the real ROI of Amazon DSP campaigns all the way to closed deal - reach out to the Prooflytics team.