How to add Grona through GTM, and why direct installation is recommended for the best experience.
3-5 minutesGrona's research and competitive intelligence features work without any code on your site. You can analyze competitors, review traffic data, and get AI-powered recommendations right from the dashboard.
To make live changes on your website, like editing text, swapping images, adjusting styles, or running experiments, Grona needs your permission. Installing this snippet grants that permission and connects your site to Grona's optimization engine.
Live editing
Change text, images, and styles through AI chat.
Experiments
Run A/B tests and track results in real time.
Your choice of scope
Add to specific pages or your entire site.
Copy this and paste it into your website's <head> section.
<link rel="preconnect" href="https://cdn.grona.ai">
<script src="https://cdn.grona.ai/workspaces/YOUR_WORKSPACE_ID/antiflicker.js" data-grona-af-bg="#ffffff"></script>
<script src="https://cdn.grona.ai/workspaces/YOUR_WORKSPACE_ID/main.js" async></script>Preconnect: Speeds up loading by establishing an early connection to Grona's CDN.
Antiflicker script: Loads synchronously to prevent content flash before optimizations apply.
Main script: Powers Grona's optimization engine: live editing, experiments, and tracking.
GTM fires the snippet on pages where your GTM container is installed. If your GTM container is site-wide, Grona will load on all pages. You can limit this by adjusting the trigger in GTM to target specific pages.
Replace YOUR_WORKSPACE_ID with the ID from your Grona dashboard. The complete snippet with your ID is available in Settings > Installation.
Follow these steps to add the Grona snippet to your Google Tag Manager site.
We recommend installing the Grona snippet directly in your site's <head> rather than through Google Tag Manager. Here's why: Grona's antiflicker script must load synchronously before the page renders to prevent visitors from seeing original content flash before your optimizations apply. GTM introduces an additional loading step. The GTM container JavaScript must download and execute first, then it fires the Grona tag. This extra step causes a delay that results in visible content flicker, degrading the visitor experience during experiments.
GTM cannot guarantee synchronous script loading before page render. Even with high tag priority, flicker is expected when using GTM. For flicker-free optimization, install directly in your site's <head> using one of our platform-specific guides.
If you still want to proceed with GTM, log in to tagmanager.google.com and select your container.
Click Tags > New. Choose "Custom HTML" as the tag type. Paste the Grona snippet into the HTML field.
Under Triggering, select "All Pages" (Page View trigger). This ensures the Grona snippet fires on every page.
In the tag's Advanced Settings, set the Tag firing priority to a high number (e.g., 9999). This makes the Grona tag fire before other tags, though it still fires after the GTM container itself loads.
Even with the highest priority, GTM tags fire after the GTM container JavaScript has loaded and executed. This is the source of the flicker. A high priority only ensures Grona fires before your other GTM tags, not before the page renders.
Click Save, then Submit and Publish your GTM container. The Grona snippet will start loading on your site via GTM.
Confirm the snippet is loading correctly.
Paste your URL to see what Grona can do. Free to start.