Conversion pixel
How it works
When a dynamic code points at a website you registered under Settings → Conversions, the redirect adds a signed dw_sid parameter to the address. The pixel on that site reads it, keeps it in one first-party cookie (_dw_sid) for the attribution window, and reports a visit. When the visitor reaches your goal page, one call reports the conversion. A newer scan replaces an older one, so the last scan gets the credit.
It needs a plan with conversion tracking (see the pricing page). The attribution window is 30 days by default and can be set from 1 to 90 days for each site.
Install it
Copy the snippet from Settings → Conversions, where it already holds your site’s public pixel key (it is not a secret), and paste it before the closing head tag of every page. It looks like this:
<script async src="https://dotwick.com/px/v1.js" data-key="dwpk_YOUR_PIXEL_KEY"></script>Report a conversion
On the page that confirms the goal, call the pixel once. The event is one of purchase, lead, signup or the name of a goal you made. A value needs a currency, and an order id lets Dotwick count the same order once, whichever way it reaches us.
dotwick('conversion', { event: 'purchase', value: 49.5, currency: 'USD', orderId: 'ORD-1001',});Consent
By default the pixel sets no cookie and sends nothing until your site says the visitor agreed. Call it from your consent tool when the visitor accepts analytics, or set the flag before the script loads. Refusing deletes the cookie.
dotwick('consent', { analytics: true });What the pixel does and does not do
- A browser that sends Global Privacy Control is treated as a refusal. This cannot be turned off.
- Turning off “require consent” for a site says you have another legal basis. The change is recorded in your audit log.
- One cookie, _dw_sid, is set on your own domain. It holds only the click id: no fingerprint, no cross-site identifier and no fallback storage.
- The address of the page is cut down to its host and path before it is kept. The query string is dropped.
- No IP address is stored. Visitors are counted with a hash that changes every day.
- Names, email addresses, phone numbers and addresses are refused, in every field.
A paragraph for your privacy notice
You decide why the pixel is on your website, so you are the controller and Dotwick processes the data for you (our data processing addendum covers it). Say so in your privacy notice. You can adapt this:
“We measure whether a visit to this website followed a scan of one of our QR codes. If you agree, we keep one cookie on this site that holds a random identifier from the scan, for as long as our attribution window lasts, and we tell Dotwick, our measurement provider, which page you reached and, for a purchase, its value and order number. We do not send your name, email address or other details for this. You can say no at any time, and we treat a Global Privacy Control signal as a no.”
Goals and where to read them
Built-in events are purchase, lead, signup. Add your own under Settings → Conversions: a name in lower case letters, digits and underscores, an optional default value, and up to 20 goals.
Read the funnel (scans, visits and conversions, with revenue for each currency) on the analytics screen, or with GET /v1/analytics/funnel. Each site shows the time of its last event, so you can check the pixel works.