Set up the pixel
The pixel is a small script on your website. It attributes purchases to creator links, so creators are paid for the sales they bring.
Install
- In dobalo, open Settings > Integrations > dobalo Pixel > Manual setup. Enter your website and press Create. You get a site key that starts with ps_.
- Copy the snippet from the same screen and paste it into the layout of your website, so it is on every page, before the closing body tag.
<script>window.dobalo = window.dobalo || function(){(window.dobalo.q = window.dobalo.q || []).push(arguments)}</script>
<script async src="https://dobalo.com/px.js" data-site="ps_0123456789ABCDEFGHIJKL" data-consent="required"></script>The key below is an example. The site key is public. Your real snippet is shown in dobalo.
Allowed domains
Paste your website address or just the hostname, for example shop.example.com. dobalo stores the hostname, up to 20 domains. Ports and wildcards are rejected. www.shop.example.com and shop.example.com are two domains.
Report a purchase
Call this once per paid order, on the order confirmation page.
dobalo('purchase', {
order_id: '1001',
value: '119.90',
currency: 'EUR',
tax: '19.14',
shipping: '4.90',
items: 2,
test: true
});| Field | Meaning |
|---|---|
order_id | Required. Your order ID. Letters, digits and _ . : - only, up to 128 characters. Never an email address or a name. |
value | Required. The gross amount paid in major units, for example 19.95. Or use value_minor with whole minor units, for example 1995. |
currency | Required. The ISO currency code, for example EUR. |
tax | Optional. The tax included in value. |
shipping | Optional. The shipping included in value. |
items | Optional. The number of items, from 0 to 1000. A count only, no names. |
test | Optional. true marks the order as a test. |
Accepted formats
- Amounts: use a plain number such as 19.95 or 1299.90, or an integer value_minor. Comma decimals and grouping such as 19,95 or 1.299,90 are read too, but for currencies with 3 decimals 1,234 means 1.234, so avoid grouping.
- Order IDs: #1001 becomes 1001. A Shopify ID such as gid://shopify/Order/123 becomes shopify:123.
- The same order ID is counted once. Do not call it for unpaid orders.
Order total
The paid order total including tax and shipping is the commission base.
Besides purchase there are dobalo('lead') and dobalo('add_to_cart', { value, currency, items }). dobalo('reference') returns the stored creator reference, or null.
Test
- Place an order with test: true. Test orders are not counted for creator commission.
- In dobalo, open the pixel and press Test / refresh. The status line changes from No signal yet to Last signal, and the list shows the last 10 events.
- Attribution: a URL with any UUID in dobalo_reference only tests delivery. To test attribution, use a real creator tracking link from your community.
- Debugging: window.dobalo.errors in the browser console lists local problems such as an invalid amount. HTTP errors on a purchase and successful deliveries are not logged there, so also check the browser's network panel and dobalo's event list.
Platforms
Shopify
Shopify does not use the pixel for sales. Install the dobalo Shopify app in Settings > Integrations > Shopify. It reads your orders directly. The pixel is optional there and only adds video-level data. Do not add both totals together.
WooCommerce
Use the dobalo for WooCommerce plugin instead of the snippet. Ask your dobalo contact for the plugin, upload it under Plugins > Add New, then open WooCommerce > Settings > Integration > dobalo and paste your site key. It reports eligible paid orders and keeps a log of the ones it cannot report.
Your own checkout
Use the snippet and the purchase call above. For sales that dobalo can verify, your server can also send signed server events: press Link server events in the pixel. The signing secret is shown once and belongs only on your server, never in your website code. Server events are currently a test pilot for EUR and USD.
Data protection
With data-consent="required" the pixel stores and sends nothing until you call dobalo('consent', true). Call dobalo('consent', false) when permission is withdrawn. Browsers that send Do Not Track are respected.
dobalo('consent', true); // permission given
dobalo('consent', false); // permission withdrawnAfter consent the pixel stores a first-party click reference and a random browser ID, each for up to 30 days. dobalo stores no raw IP address, user agent, page path, email or name. Events are deleted after 180 days.
You are responsible for asking your visitors for consent. This page is not legal advice.
Common problems
- Nothing arrives: the page is not on one of your allowed domains. Compare it exactly, including www.
- Nothing arrives: an ad blocker or your Content Security Policy blocks the script. Allow https://dobalo.com in script-src and https://api.dobalo.com in connect-src.
- Nothing arrives: consent was not given yet, or Do Not Track is on.
- No purchase: order ID, amount or currency is missing or invalid. Check window.dobalo.errors, the network panel and the event list.
- Wrong amount: use a valid ISO currency code, and write the amount with the decimals that currency has.