Tag Manager is a good fit when you cannot edit the site's templates or want to control the popup without a deploy. It is a worse fit when the site already hardcodes the snippet: two copies initialise the widget twice. This guide assumes the GTM container is already installed on the site and was checked against the Tag Manager documentation, not tested on a live container.
Create the tag
- In Tag Manager, open Tags and choose New.
- For tag type, choose Custom HTML.
- Paste both lines from the studio's publish panel:
<div data-popuploom="YOUR_WIDGET_ID"></div>
<script src="https://popuploom.com/embed/1.2.0/popuploom.js"></script>
Keep the div and the script together in the same tag. Splitting them across two tags makes the order unpredictable.
Choose the trigger
| Goal | Trigger | Note |
|---|---|---|
| Popup everywhere | All Pages | Simplest. Let the popup's own URL rule narrow it if needed. |
| One section | Page Path contains /blog/ | Match the same path in the popup's URL rule so the two agree. |
| One page | Page Path equals the route | Exact matching avoids firing on query-string variants. |
The trigger decides where the widget is available; the popup's own targeting decides when it appears. Two layers can disagree, and the symptom is a popup that never shows on a page you expected. Set both deliberately.
Consent and privacy
If the site runs a consent banner or Consent Mode, a Custom HTML tag can be held until a choice is made. Check that the tag is permitted after consent and that the popup's own storage (frequency rules) is described in your privacy notice. Tag Manager does not make a third-party widget compliant by itself.
Blocked by an ad blocker. Custom HTML tags under a GTM container can be blocked when a visitor blocks Tag Manager. That is a reason some sites hardcode the snippet instead. Decide which failure mode you prefer: no popup for blockers, or a deploy needed for every change.
Test before publishing
- Use Preview and connect to the site.
- Confirm the tag fired on the intended route, not on checkout or account pages.
- In the browser console, check for the script request and for widget errors.
- Submit a test response and confirm it reaches the lead inbox.
- Publish a container version. Preview mode alone does not change the live site.
CSP and checkout
If the site sends a Content Security Policy, add https://popuploom.com to script-src and connect-src, and keep the Tag Manager domains allowed. Checkout flows that run on a separate domain or a stripped template may not include the GTM container at all; test the real checkout, not the cart page.
Removal
Pause or delete the tag and publish a new container version. The saved popup remains in the studio.
Common questions
Which tag type should I use for the popup?
Custom HTML. Paste the widget div and the script tag exactly as the studio provides them. Do not use the conversion or remarketing templates; they expect a different payload.
Which trigger should the tag use?
All Pages is the simplest. If the popup should only appear on some routes, use Page Path conditions instead, and add the same restriction in the popup's URL rule so the two do not disagree.
Why is the tag not firing after I publish?
Check Preview mode first. Common causes are a trigger that does not match the route, a consent setting that blocks the tag until a choice is made, an ad blocker in the test browser, or a second hardcoded snippet loading the same widget.
Can I hardcode the snippet and use Tag Manager too?
No. Two copies load the widget twice and can initialise it twice. Pick one deployment method for a given site.
Official references
- Google Tag Manager: web developer guide — container installation, tags and triggers.
- Google: CSP for tag platforms — the domains a Tag Manager deployment needs.
Written by Shailu016, founder of PopupLoom. Checked against the Tag Manager documentation on 17 November 2026; not tested on a live container. No ranking, traffic or conversion claim is made. Related: the general install guide, static HTML and BigCommerce.