Google Tag Manager
Add the widget to every page your Google Tag Manager container runs on, as a Custom HTML tag, test it in Preview, and fire it only once a visitor agrees.
Last updated Tuesday, November 24th, 2026
View as MarkdownOn this page
If your site already runs a Google Tag Manager container, the widget can go in as a tag, with no change to your site's code.
Before you start
- Copy your workspace's id. In Settings (opens Notert in a new tab), open General (opens Notert in a new tab) under Conversations and switch Conversations on if it's off. Then open Widget (opens Notert in a new tab), press Open guide, and find your snippet under Add it to your site. Your workspace's id is the first value its
initpasses, in quotes. See install the widget. - List your site's address. Under Where it works in the install guide, check the website your container runs on is covered. See where the widget works.
- Publishing rights in Tag Manager. You need permission to publish the container, or someone who has it to publish your change.
The tag
Tag Manager may refuse newer JavaScript in a Custom HTML tag, such as the arrow functions in the install guide's snippet, and handles the type of the scripts it adds in its own way. So paste this version instead. It does the same as the snippet, in older syntax, and adds the widget's script itself:
<script>
window.$notert = window.$notert || [];
window.notert = window.notert || new Proxy({}, {
get: function (_, call) {
if (typeof call != "string" || call == "then" || !/^[a-z]/i.test(call)) return undefined;
return function () {
window.$notert.push([call].concat(Array.prototype.slice.call(arguments)));
};
}
});
window.notert.init("YOUR_WORKSPACE_ID", { widget: true, theme: "page" });
(function () {
var src = "https://app.notert.io/embed/v1.js";
if (document.querySelector('script[src="' + src + '"]')) return;
var script = document.createElement("script");
script.type = "module";
script.async = true;
script.src = src;
document.head.appendChild(script);
})();
</script>Put your workspace's id in place of YOUR_WORKSPACE_ID. The options are those the install guide writes: for your own button rather than the round one, add launcher: false, and for another theme, set theme to "light", "dark" or "auto". Every option is in the JavaScript reference.
Add it to your container
- In Tag Manager, open your container, then Tags, and press New.
- Under Tag Configuration, choose Custom HTML and paste the tag above.
- Under Triggering, choose All Pages.
- Name the tag, such as Notert widget, and save it.
- Press Preview and open your site in the window it connects. Your site shows the round button once the page has loaded, and Tag Assistant lists Notert widget among the tags that fired.
- Back in Tag Manager, press Submit, then Publish, so the change reaches every visitor.
- Open a page of your site. Within moments, the install guide's Check it's live shows its address.
Calls from your site or other tags
The widget's own calls, such as identify for a signed-in user or context for what your page knows, can run from your site's code or from another tag once this one has fired, whether the widget has loaded yet or not: the tag keeps each call and the widget plays them back in order.
From another tag, set its tag sequencing, under Advanced Settings, to fire Notert widget first, or check window.notert exists before calling it. A token for identify must come from your server, never be signed in a tag: see sign a token on your server.
Behind a consent banner
If your site uses Tag Manager's consent settings, you can hold the tag until a visitor agrees. Open the tag's Advanced Settings, then Consent Settings, choose Require additional consent for tag to fire, and add the consent type your banner uses for features like support chat, such as functionality_storage. The widget sets no cookies, and stores a key in the browser only once a visitor opens it; which category it belongs to is your call. See what the widget records about visitors.
If a visitor withdraws consent, the tag that already fired stays on the page until the next load. To take the widget off at once, run window.notert.shutdown({ forget: true }) from the tag your banner fires on withdrawal. See shutdown.
Content Security Policy
If your site sends a Content-Security-Policy header, it must let Tag Manager run its Custom HTML tags, which are inline scripts, and allow the widget's sources at https://app.notert.io. See Content Security Policy for the sources the widget needs.