Skip to content
All articles

Product guides

Installing through Google Tag Manager, and when not to

How to load Provedly from a Google Tag Manager Custom HTML tag, which triggers to use, and the cases where a direct script tag is the better choice.

Provedly team··5 min read

Google Tag Manager can load Provedly with a Custom HTML tag on an All Pages trigger, and for teams who cannot touch the site's templates that is the fastest route. But GTM is an indirection layer with its own loading order, consent gating and blocker exposure, and for a widget whose entire value is being seen, each of those costs something. This post shows the install and then tells you when to skip GTM.

The tag

Create a new tag, type Custom HTML, and paste either the plain script tag or the function form. GTM accepts both; the function form is what the dashboard generates for bars because it is explicit about attributes.

<script>
    (function () {
        var s = document.createElement('script');
        s.src = 'https://provedly.app/w/widget.js';
        s.setAttribute('data-token', 'pp_your_token');
        s.async = true;
        document.body.appendChild(s);
    })();
</script>

Trigger: All Pages. Name the tag something a successor will understand, publish the container, and check the Provedly dashboard for the first impressions within a few minutes. For a CTA bar, repeat with https://provedly.app/w/cta.js and the bar's token.

Do not add URL filters in GTM to control where the widget appears. Provedly's URL targeting (all pages, only these, all except) and device targeting are configured in the dashboard and apply the same whether the script came from GTM or from the page. One place for the rule beats two.

Single-page apps

If your site is a SPA, GTM's All Pages trigger fires once on initial load, which is correct for Provedly. The loader is idempotent and handles route changes itself. Do not add a History Change trigger for this tag; it would inject a second script element on every navigation. The loader checks for an existing instance before initialising, so the harm is wasted requests rather than duplicate toasts, but there is no upside.

When GTM is the wrong tool

Consent gating delays or blocks the widget

Many consent setups hold all GTM tags until the visitor accepts cookies. If Provedly sits behind that gate, visitors who decline, or who never interact with the banner, never see a notification. Whether the widget needs consent at all is a question for your own privacy review; it sets a visitor id for session caps and attribution. If your review concludes it does not need consent, loading it directly in the page avoids a gate that was designed for analytics and ads.

Blockers

Content blockers commonly block the GTM container itself. A visitor using one sees no tags from that container, Provedly included. A direct script tag from provedly.app is a separate decision for the blocker and is not caught by rules aimed at googletagmanager.com. This matters more for audiences skewed to technical users.

Shopify

On Shopify, use the Provedly app and its theme app embed rather than GTM. The app imports the last 60 days of orders on install, receives every new order through a signed webhook, and so marks purchases "Verified" without any script tag. GTM on Shopify also does not run on checkout for most plans, so the install would be partial. See the Shopify setup guide.

You need the visitor id at checkout

Proof-assisted orders in the dashboard are matched by visitor id. Your checkout code reads it with window.Provedly?.visitorId() and passes it as Stripe metadata.provedly_visitor or the Records API visitor field. If GTM loads Provedly late, the id may not exist when your checkout code runs. It is solvable with a short wait, but a direct async defer tag in the template removes the race.

Sequencing and performance

GTM loads the container, then evaluates triggers, then injects the script. That is two extra hops before a 6 KB file. On a fast page it is a few hundred milliseconds; on a slow one it can push the first toast past the point where the visitor has scrolled away. The widget already waits 3 seconds by default before the first notification, and you are adding to that.

A decision table

Situation Recommendation
Marketing team cannot edit templates GTM, All Pages trigger
Site behind strict consent gating Direct tag, after your privacy review
Shopify store Provedly app, no GTM
Need attribution at checkout Direct tag in the template
Technical audience, heavy blocker use Direct tag
Multiple sites managed by an agency Either; Agency plan covers 1,000,000 impressions across sites

Verifying the install

Open your site, wait a few seconds, and look for the toast. If nothing shows, check in this order: the GTM container is published (not just previewed); the tag fired in GTM's debug panel; the page domain is in the allowed domains list for the site in Provedly; the widget has at least one record to show, otherwise it has nothing to say. A new widget with no records is the most common "it does not work" report. Post one record through the API, or import a CSV, and it will appear labelled Imported. Or connect Stripe and wait for the first real order.

Frequently asked questions

Can I load the widget only after consent and still count impressions accurately?

Yes. Impressions are counted when a notification is actually shown, so a gated widget that never loads never consumes an impression. The cost is reach, not accuracy.

Does GTM's own script count toward my impression quota?

No. Only rendered notifications count. One impression is one notification shown to one visitor, roughly 3 per visit.

Can I use GTM for the widget and a direct tag for the bar?

Yes, they are independent loaders with separate tokens. Mixing is fine as long as each appears once per page.

Whichever route you choose, the Free plan is enough to test it on a real site: create an account.

google tag managerinstallation

Get new articles by email

Honest social proof, verified purchases and what actually moves conversion. A few emails a month at most; leave with one click.

We email you once to confirm. Your address is used only for this newsletter; see the privacy policy.

Show proof you can stand behind.

Free plan, one site, 2,000 impressions a month, verified purchases included. The badge on the free plan links to your verification page, which is the point.