Grona
Google Tag Manager

Installing Grona via Google Tag Manager

How to add Grona through GTM, and why direct installation is recommended for the best experience.

3-5 minutes

Why you need the Grona snippet

Grona'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.


Your Grona snippet

Copy this and paste it into your website's <head> section.

HTML
<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.


Step-by-step instructions

Follow these steps to add the Grona snippet to your Google Tag Manager site.

1

Consider direct installation first

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.

2

Open Google Tag Manager

If you still want to proceed with GTM, log in to tagmanager.google.com and select your container.

3

Create a new Custom HTML tag

Click Tags > New. Choose "Custom HTML" as the tag type. Paste the Grona snippet into the HTML field.

4

Set the trigger

Under Triggering, select "All Pages" (Page View trigger). This ensures the Grona snippet fires on every page.

5

Set tag priority

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.

6

Save and publish

Click Save, then Submit and Publish your GTM container. The Grona snippet will start loading on your site via GTM.


Verify your installation

Confirm the snippet is loading correctly.

  • 1
    Visit your site in a browser.
  • 2
    Open DevTools (right-click > Inspect > Network tab).
  • 3
    Filter by "grona" in the network requests.
  • 4
    Confirm you see antiflicker.js and main.js loading (status 200).
  • 5
    Note: you may observe a brief content flash before the optimized version appears. This is the GTM latency described above.

Ready to optimize your site?

Paste your URL to see what Grona can do. Free to start.