Skip to content
pixelary Docs

WordPress

Header code Plugin soon

Add the script to the head of every page. A Pixelary plugin for WordPress is coming soon; until then, either method below takes a couple of minutes.

1 With a header code plugin

Plugins such as WPCode let you add code to the site header without touching the theme. Create a new snippet of type HTML, set its location to Site Wide Header, paste your script and activate it.

Site Wide Header
<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script>

2 Or in your theme

If you maintain a child theme, add the script with the wp_head hook:

functions.php
// functions.php of your child theme, or a code snippets plugin
add_action('wp_head', function () {
    echo '<script async src="https://cdn.pixelary.app/s/px_7hq2lm4x.js"></script>' . "\n";
});

Edit a child theme, not the parent: a theme update would remove the change.

Caching and optimization plugins

Plugins that delay or combine JavaScript can hold the script back until the visitor scrolls or clicks, and events from the first seconds get lost. Exclude cdn.pixelary.app from “delay JavaScript” and “combine JavaScript” settings, then clear the cache.

WooCommerce: to send Purchase with the order value, call the JavaScript API on the order received page, or use a page trigger on its URL.

Pixelary sends nothing a visitor has declined. In the EEA, the UK and Switzerland it waits for the visitor’s yes before any pixel loads or any event leaves the page.

Visitors from Europe need a consent banner

Without a banner, Pixelary never gets a yes from visitors in the EEA, the UK and Switzerland, so they are not tracked.

Pixelary reads these on its own, with no extra setup:

  • Google Consent Mode v2
  • IAB TCF 2.2
  • Global Privacy Control
  • Cookiebot
  • OneTrust
  • CookieYes
  • Usercentrics
  • Complianz
  • iubenda
  • Termly
  • Osano
  • CookieFirst
  • Didomi (via TCF)
  • Framer cookie banner

Another banner can pass its answer with one line of code. Consent & banners

Something here doesn’t match what you see? Write to hello@pixelary.app.