Install the Pixel with Google Tag Manager
Summary: Use the Delivr.ai Pixel tag template to install the pixel from Google Tag Manager without a Custom HTML tag. The template needs one field, your Pixel ID, and can wait for Google Consent Mode before it loads the pixel or sends anything.
Add the Template
- In Google Tag Manager, open Templates > Tag Templates, select Search Gallery in the Tag Templates section, and add Delivr.ai Pixel.
- If Delivr.ai Pixel does not appear in the gallery, download
template.tplfrom the Delivr-Ai/gtm-template repository on GitHub. In Templates > Tag Templates, select New, open the menu in the top right, choose Import, and select the file.
Create the Tag
- Go to Tags > New and choose Delivr.ai Pixel as the tag type.
- Enter your Pixel ID. It is the UUID in your install snippet,
https://cdn.delivr.ai/pixels/PIXEL_ID/p.js. The field rejects values that are not a UUID. - Choose the Initialization - All Pages trigger, so the pixel loads on the first page view. All Pages also works.
- Save, preview, and publish the container.
Confirm the install in the Delivr.ai dashboard. The pixel page shows its first events within a minute of a page view. You can also use the verification endpoint.
The tag loads the same script as the HTML snippet. Firing the tag more than once on a page does not load the pixel a second time.
Consent Mode
The tag's Wait for Google Consent Mode consent before loading option is checked by default. Pick the consent type to wait for: ad_storage (default), analytics_storage, ad_user_data, or ad_personalization.
With the option checked:
- The pixel loads only when the selected consent type is granted.
- If consent is granted later in the page view, the pixel loads at that point.
- If consent is withdrawn, the pixel stops sending, including when the withdrawal happens while the script is still loading. A later grant resumes it.
- A site that never sets Consent Mode counts as granted, so the pixel loads as it would from a Custom HTML tag. Your consent platform must publish its decisions to Consent Mode for the option to have any effect.
The decision is page-wide and covers every Delivr.ai pixel on the page. If you have several Delivr.ai tags that wait for different consent types, the pixel sends only while all of those types are granted.
Uncheck the option to load the pixel regardless of Consent Mode. To manage consent with your own code instead, see Connect Your Consent Manager.
Separately from the template, the Delivr.ai collection endpoint attaches no identity to events from browsers that send Global Privacy Control (Sec-GPC: 1).
Limits
- The template loads the pixel only from
cdn.delivr.ai. It does not support white-label pixel domains. For a white-label pixel, use a Custom HTML tag with the script tag for your domain. - For a single-page app, see SPA Pixel Integration for page view handling after the first load.
Updated about 4 hours ago
