Install via Google Tag Manager
How to deploy the PixelsCleared script using Google Tag Manager.
Why Use GTM
If your website already uses Google Tag Manager, you can deploy the PixelsCleared script as a tag rather than editing your site's source code directly. This lets you control when and where the script loads, and test it with GTM's built-in Preview mode before publishing.
Create a Custom HTML Tag
- Open your GTM container at tagmanager.google.com.
- In the left sidebar, go to Tags > New.
- Click Tag Configuration and select Custom HTML.
- Paste the script tag from your PixelsCleared dashboard:
<script src="https://track.yourdomain.com/pixelscleared.js"></script>
Replace track.yourdomain.com with the CNAME subdomain you configured for your tenant. You can find the correct script tag in Gateway > Tenant Setup in the PixelsCleared dashboard.
Set the Trigger
- Click Triggering and choose All Pages.
- This ensures the PixelsCleared script loads on every page of your site, which is required to capture all tracking events.
If you only want the script on specific pages (for example, a subdomain or a particular section of your site), choose Some Page Views and set the conditions to match those URLs.
Set Tag Firing Priority
Setting a high firing priority ensures the PixelsCleared script loads before other tracking tags in your container. This is important because PixelsCleared intercepts events from other scripts.
- Open the tag you just created.
- Click Advanced Settings > Tag Sequencing.
- Under Fire a tag before this tag fires, you can optionally set a setup tag if needed.
- In Advanced Settings > Tag firing priority, enter a high number such as 100.
Tags with higher priority numbers fire first. Since PixelsCleared needs to be active before other pixels fire, set its priority higher than your Meta Pixel, GA4, or other tracking tags.
Test with GTM Preview Mode
Before publishing, verify the tag fires correctly:
- Click Preview in the top right corner of GTM.
- Enter your website URL and click Connect.
- The Tag Assistant window opens and loads your site.
- In the Tag Assistant, look for your PixelsCleared Custom HTML tag in the Tags Fired section.
- Confirm it shows as Fired and not Not Fired or Paused.
- Open the browser Network tab on your site and verify that a request to
track.yourdomain.com/pixelscleared.jsreturns a 200 status.
If the tag did not fire, check that the trigger conditions match the page you are testing and that the script URL is correct.
Publish the Container
Once testing confirms the tag works:
- Return to the GTM workspace.
- Click Submit in the top right corner.
- Enter a version name (for example, "Added PixelsCleared tracking script").
- Click Publish.
The PixelsCleared script will now load on your live site. Events will start appearing in the PixelsCleared dashboard once visitors grant consent.