From the front door to your front page.
Keep the context when someone scans a flyer and visits your website. The pixel and conversion API connect supported website events back to campaign activity.
- A JavaScript snippet or Google Tag Manager
- Server-side conversions
- Standard events from ScanLanding to Purchase
Private beta. The snippet and server endpoint are available today.
// on every page
doordroppr('init', 'YOUR_PIXEL_ID');
// when a visitor books
doordroppr('track', 'Booking', {
value: 149.00,
currency: 'USD'
});- ScanLanding
- PageView
- Lead
- Booking
- Purchase
- Call
A scan today can matter after the first visit.
The pixel is the measurement layer for a site you already own. The customer stays in your existing journey. Five hops connect a piece of paper on a doorstep to an event on your campaign.
- 1Flyer
QR codeEach code is tied to a campaign. It can also carry a territory, a crew member or a coupon.
- 2Redirect
GET /f/:codeLogs the scan, then answers with a 302. Repeat hits within 3 minutes reuse the same scan.
- 3Your page
?dd_scan=…&qr=…The visitor lands on your own site with the scan id and the code in the URL.
- 4Snippet
doordroppr('init', …)Stores the token in a first-party cookie and reports ScanLanding once per session.
- 5Endpoint
POST /trackEach event you report is stored against the scan, the code and the campaign.
An unknown code still redirects to a real page and logs nothing. The landing URL also carries a coupon parameter when the code has one.
Install
One small script with no build step. The loader queues any call made before the file finishes loading, so you can report events immediately.
Paste the loader into the head of your pages
Copy the exact block from the pixel settings screen in the app. It comes filled in with your script URL and your pixel id. The placeholders below show the shape.
<script> !function(w,d,s,u){ if(w.doordroppr)return; var t=function(){t.queue.push(arguments)}; t.queue=[];t.loaded=false;w.doordroppr=t; var js=d.createElement(s);js.async=true;js.src=u; var f=d.getElementsByTagName(s)[0];f.parentNode.insertBefore(js,f); }(window,document,"script","YOUR_PIXEL_SCRIPT_URL"); doordroppr('init', 'YOUR_PIXEL_ID'); </script>Report the actions that matter
Call
trackwhen your site confirms something. A booking is more useful than another page view. The values here are illustrative.// After your site confirms a booking: doordroppr('track', 'Booking', { value: 149.00, currency: 'CAD' }); // Events without a value doordroppr('track', 'Lead'); doordroppr('track', 'Call'); doordroppr('track', 'PageView');Check the whole journey
- Scan a campaign code and confirm the landing address contains
dd_scanandqr. - Confirm a
_dd_scancookie exists on your domain. - Trigger your event and look for a POST that returns 200 with
"attributed_to": "scan". - Open the Attribution screen in the app and find the event on the campaign.
- Scan a campaign code and confirm the landing address contains
Commands
| Call | Arguments | What it does |
|---|---|---|
doordroppr('init', id, options) | id is your pixel id. options.trackUrl is optional. | Reads dd_scan and qr from the address, stores them, then reports ScanLanding once per session if a token is known. |
doordroppr('track', event, params) | event is an event name. params.value and params.currency are optional. | Posts the event with a fresh event_id and the stored token. Called before init, it logs a console warning and sends nothing. |
Events
Use explicit events. Configure the meaningful actions on your site instead of assuming a page view means a booked customer.
| Event | Stored as | When it fires | Parameters | Counts as revenue |
|---|---|---|---|---|
ScanLanding | scan_landing | Automatic. Once per browser session when a scan token is known. The redirect records it too. | None | No |
PageView | page_view | Your call, on any page you want counted. | None | No |
Lead | lead | Your call, on a form submit or quote request. | value, currency (optional) | No |
Booking | booking | Your call, when your site confirms an appointment. | value, currency | Yes, when a value is sent |
Purchase | purchase | Your call, when an order is paid. | value, currency | Yes, when a value is sent |
Call | call | Your call, on a tap-to-call link. | None | No |
Request body
The snippet posts JSON to the track endpoint with keepalive set, so an event survives the page navigating away.
| Field | Type | Presence | Notes |
|---|---|---|---|
pixel_id | string | Required | Public id for your organization. Starts with px_. Safe in browser code. |
event | string | Required | One of the six standard event names, in CamelCase. |
key | string | Server only | Your secret key. Marks the event as server-sourced. Never sent by the snippet. |
value | number | Optional | Amount in dollars, such as 149.00. Stored in cents. Accepted range is 0 to 1,000,000. |
currency | string | Optional | Defaults to CAD. |
dd_scan | string | Optional | The scan id from the landing URL. The exact scan is the preferred attribution. |
qr | string | Optional | The flyer's code. Used as the fallback when no scan id resolves. |
event_id | string | Optional | A UUID used to drop duplicates. The snippet generates its own for every call. |
url | string | Optional | The page address. The snippet sends location.href. |
ua | string | Optional | The browser's user agent string. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Recorded and attributed | attributed_to is "scan" or "qr". |
| 202 | Recorded, not attributed | No scan id or code resolved. attributed_to is null. |
| 400 | Rejected | invalid JSON body, pixel_id is required, unknown event, value is not a number, value out of range. |
| 401 | bad key | A key was sent and it does not match. |
| 403 | pixel_not_entitled | The pixel is paused, or the organization's plan does not include it. |
| 403 | cross-org token | The scan or code belongs to a different organization. |
| 404 | unknown pixel | No organization has that pixel id. |
| 405 | method not allowed | Anything other than POST, or OPTIONS for the preflight. |
| 500 | could not record event | The write failed. Safe to retry with the same event_id. |
{
"ok": true,
"event_id": "11111111-2222-4333-8444-555555555555",
"attributed_to": "scan"
}Every response carries open CORS headers, and the endpoint answers the OPTIONS preflight with 204, so browsers can post from any origin.
Server-side
Report from the browser or the server. A backend call does not depend on the visitor's browser finishing the request. Your server needs the scan id, so pass it along from the landing page with the form or the order.
curl -X POST "YOUR_TRACK_ENDPOINT" \
-H "Content-Type: application/json" \
-d '{
"pixel_id": "YOUR_PIXEL_ID",
"key": "YOUR_SECRET_KEY",
"event": "Booking",
"value": 149.00,
"currency": "CAD",
"dd_scan": "SCAN_ID_FROM_LANDING_URL",
"event_id": "11111111-2222-4333-8444-555555555555"
}'Generate one event_id per conversion. A retry with the same id is stored once.
| Endpoint | /track | /conversion |
|---|---|---|
| Use it for | Any standard event, from a browser or a server | Bookings, leads, purchases and calls from a backend |
| Event field | event, CamelCase | kind, lowercase |
| Amount | value in dollars | value_cents in cents |
| Duplicate guard | event_id | external_ref, such as your booking id |
| Key | Optional. Present means server-sourced. | Required with pixel_id |
| Attribution | Optional. Unattributed events return 202. | Required. Send dd_scan or qr. |
| Success | 200 or 202 | 201 with conversion_id |
Keys
Public pixel configuration and server credentials have different roles.
- Pixel id
- Public
- Format
px_followed by 18 characters- Lives in
- Your page source
- Grants
- Browser-sourced events for your organization
- Count
- One per organization
- Secret key
- Server only
- Format
- Starts with
sk_live_ - Lives in
- Your server's environment. Never in browser code.
- Shown
- Once, when an owner or admin rotates it. Only a SHA-256 hash is stored.
- Rotation
- The old key stops working immediately
An owner can pause the pixel from the same screen. While paused, both endpoints answer 403 and flyers keep redirecting.
Cookies and privacy
The pixel uses first-party browser storage to keep attribution context for return visits. A later direct visit, with nothing in the address, can still attribute.
| Name | Where | Lifetime | Holds |
|---|---|---|---|
_dd_scan | Cookie | 365 days | The scan id. First-party, Path=/, SameSite=Lax, Secure on HTTPS. |
_dd_scan | localStorage | Until cleared | A second copy of the scan id, read when the cookie is gone. |
_dd_qr | localStorage | Until cleared | The flyer's code, kept as the fallback attribution. |
_dd_scan_landing | sessionStorage | One session | A flag so ScanLanding is reported once per session. |
- What the snippet sends
- Pixel id, event name, event id, value and currency if given, the scan id and code, the page URL and the user agent.
- What it does not send
- Names, emails, phone numbers or form contents. There are no fields for them.
- Cross-site cookies
- None. Requests are sent with credentials omitted, so no cookie travels with them.
- What the redirect logs
- The code scanned, the time, the user agent, and the IP address with its country header.
- Consent
- The snippet has no built-in consent mode. Load it after your own consent check where the law requires one.
Limits
The system does not guarantee every customer will be matched. These are the known edges.
- Attribution is not guaranteed.It depends on campaign context, integration setup, consent, browser behavior and the customer journey.
- The chain can break.Cleared cookies, browser restrictions, declined consent or a change of device all lose the token.
- Custom event names are rejected today.The snippet will send any name. The endpoint answers 400 for anything outside the six standard events.
- One touch, not a full chain.A scan token is remembered for return visits. First-touch and last-touch modelling across several flyers is not built.
- No coupon or address matching yet.Only the scan id and the bare-code fallback are in place.
- The pixel needs an entitlement.Without it the endpoint returns 403. Flyers still redirect and scans are still logged. Plans and prices are not published yet.
Questions
What does the pixel require?
A supported site where you can install the script, correct event configuration, and the appropriate account entitlement. You are responsible for applicable consent and privacy requirements.
Is attribution guaranteed?
No. Attribution depends on available campaign context, integration setup, consent, browser behavior, and the customer journey.
Can I report from both the browser and my server?
Pick one path per conversion for now. The endpoint drops duplicates that share an event_id, but the snippet generates its own id for every call and does not accept one from you, so a browser event and a server event for the same booking would both be stored.
Does a page view count as a customer?
No. Configure the meaningful actions on your site. Only Booking and Purchase events that carry a value feed the campaign's revenue figure.
Where do I start?
Open Integrations and choose the universal JS snippet or Google Tag Manager guide for your site. The directory distinguishes available setup paths from planned native connectors.
Find out what a scan turned into.
Add one snippet to your site and connect bookings to the flyer.
- Join the list
- Get your invite by email
- Walk your first street