Install the tracker
Put a website's tracker snippet on every page of your site so events start reaching the relay.
Each website has its own snippet. It loads the tracker from Pixel Relay and sends a page view on every page. Your conversions are then sent with one line of JavaScript each, see Send events.
- Step 1: Open the website and scroll to Install the tracker.
- Step 2: The API key identifies this site to the relay. The WordPress plugin asks for it.
- Step 3: The snippet loads the tracker and sends a page view on every page.
- Step 4: Click Copy snippet, then paste it into the head of every page of the site.
Copy the snippet
- Open Websites and click the website.
- Scroll to Install the tracker.
- Click Copy snippet.
It looks like this, with your website's API key in the address:
<script>
window.PixelRelayTrackerConfig = { autoTrackPageViews: true };
</script>
<script src="https://pixelrelay.co/api/tracker/YOUR_API_KEY.js" async></script>
Paste it into your site
Paste the snippet into the <head> of every page, just before </head>. Where that is depends on how the site is built:
- WordPress: use the Pixel Relay plugin instead. It adds the tracker and sends form and WooCommerce events for you.
- A theme or template: add it to the shared header template, so every page gets it.
- Google Tag Manager: add a Custom HTML tag with the snippet, firing on All Pages.
- Website builders (Webflow, Squarespace, Wix): use the site-wide custom code in head setting.
Keep the two parts in this order. The settings block must come before the script, or the tracker will not start on its own.
Remove the Meta Pixel for the same events
If the site also has Meta's own pixel code sending the same events, Meta counts them twice and the browser still talks to Meta. Remove the pixel code, or stop it sending the events Pixel Relay sends.
The API key
The API key under Install the tracker identifies the website. It is not a secret, it is part of every page that carries the snippet, and the relay only accepts it from your allowed domains. The WordPress plugin asks for it.
Next
Related articles
Still stuck?
Tell us what you are trying to do and we will help you set it up.