Install the website pixel

Updated 1 November 2026 · 5 min read

The website pixel is a small script on your website. It tells PostBuddy what visitors do: which pages they see, what they put in the cart, when they order. Visitors who are known, because they came through the QR code or link of a card or logged in, become contacts with an address. That is what a Postflow with the pixel as its source sends mail on, what a journey can wait for and how an order counts as a conversion of a card.

The pixel needs the Contacts and Website pixel features in your plan. Owners, Admins and Developers set it up under Website in the menu. The tab Set up walks you through four steps and ticks each one off when it is done; Events lists every event you can use, and Visitors shows the visits as they come in and who was recognised. The keys and the code for developers are under Developers, Website pixel.

1. Install

Choose where your website runs: your own website, Google Tag Manager, WordPress, Shopify, WooCommerce or Lightspeed. The tab shows where the code goes on that platform; for Shopify, WooCommerce and Lightspeed it also gives ready code that reports orders with their amount (see The pixel on Shopify, WooCommerce or Lightspeed). Copy the snippet and paste it, or type your developer's e-mail address under Send the code to your developer: they get the snippet and the developer guide by mail.

Place the snippet so it loads on every page. If your website keeps code in a cookie category, choose Necessary: the pixel waits for the visitor's consent by itself and sends or stores nothing before it, while the picker and the first page view need the script loaded. The line under the snippet says which consent setting it carries. With Manual your cookie banner tells the pixel the visitor's choice; the tab shows the line it calls. The test snippet is for a staging site: its events make test cards and stay out of your figures.

2. Check

Type your page and choose Check my website. PostBuddy opens the page and tells you what it found: the snippet with your live key, the test key, another organisation's key, or nothing. When something is wrong you see what to do:

What the check saysWhat to do
The snippet is not on this pagePaste it, publish the change and check again.
The snippet is not in the page, but Google Tag Manager isPublish the Tag Manager container and open your site once; the live view shows whether it works.
This page uses the test keyUse the live snippet on your real website.
The snippet is there, but no events arrived this weekThe pixel waits for consent. Let your cookie banner tell it (Manual) or use a banner with Google Consent Mode.
This website is not in your domainsAdd the domain under Advanced.

The Live view below the check shows the events of the last hour per minute and the newest events, refreshed every ten seconds.

3. Measure

Measure clicks, pages and forms without code: open your website with the picker and click what you want to measure. See Measure without code with the picker.

4. Recognise

A card goes to an address, so the pixel has to learn whose visit it is. Three ways, use the ones that fit:

  • The QR code or link on a card. With the switch on, visitors who come through a card are recognised by themselves.
  • Your own customer number. After a login or an order your developer calls pb('identify', { customerId: '1042', signature }) with the number your contacts carry as external id and a signature made on your server with the identity secret. Make the secret in this step; it is shown once. Without a valid signature the number is kept with the visit but recognises nobody, so nobody can claim to be one of your customers.
  • An e-mail signed on your server. The same works with the hash of an e-mail address, for example after an order; the WooCommerce plugin does it once the secret is in your wp-config.php. The e-mail of a form you marked in the picker is hashed in the browser and kept with the visit, but cannot be signed there, so it does not recognise a contact.

Advanced

Under Advanced you find the consent setting, the domains, the retention period and the passage for your privacy statement.

Your situationConsentWhat happens
A cookie banner with Google Consent Mode or the IAB TCF standardAutomaticThe pixel reads the banner. Nothing is sent or stored until the visitor accepts marketing cookies. A Consent Mode default never counts, only the visitor's choice.
Your own banner, or another tool that knows when the visitor acceptedManualYour banner calls pb('consent', true) when the visitor accepts, pb('consent', false) when they refuse, and repeats the stored choice at every page load.
You do not want cookies at allNo cookiesThe pixel stores nothing on the device. It only knows a visitor while the page is open, so visitors are recognised through a card's QR code or link.

The choice is part of the snippet: change it and paste the new snippet. A browser that sends Global Privacy Control never sends anything, whatever you choose. The pixel key is public: it only says which organisation the events belong to. Rotate a key when the snippet ended up somewhere it should not be. Name your domains so events from other websites are refused.

Read Privacy and the website pixel before you switch it on, and add the passage to your privacy statement.

Still need help?

Open a support ticket in the portal. Tell us what you tried and, if you can, which item or Postbatch it is about.

Contact support