Articles on: Share & analyse

Analyse embed statistics

You can see how your embeds perform in two places: on the Statistics page in your Maglr dashboard, and in your own Google Analytics 4 property or Google Tag Manager container if you connect one to the domain. Each embed code contains a hash, and you use that hash to tell embeds apart in both places.


Finding an embed's hash


Every embed code you create in Maglr contains a hash of 10 lowercase letters and numbers, such as a1b2c3d4e5. The hash is in the embed code:


  • in the embed URL, for example https://embed.maglr.com/a1b2c3d4e5
  • in most iframe embed codes, also in the data-maglrEmbed attribute, for example data-maglrEmbed="a1b2c3d4e5"
  • in Automatic format (inject) embed codes, also in the maglrid attribute, for example maglrid="a1b2c3d4e5"


In this example embed code, the hash is a1b2c3d4e5:


<div data-maglrEmbed="a1b2c3d4e5" data-type="banner" style="position:relative; width:auto; padding: 0 0 56.25%;"><iframe src="https://embed.maglr.com/a1b2c3d4e5?banner=1" frameborder="0" style="position:absolute;width:100%;height:100%;" allowfullscreen></iframe></div><script type="text/javascript" src="https://embed.maglr.com/assets/embed/js/embed.min.js" ></script>


The hash belongs to what you embed and how you embed it. Each page has one hash for all its iframe embed types and a separate hash for its Automatic format (inject) embed. The whole project has one hash of its own, which both whole-project embed types (Fixed format (manual) and Preview with fullscreen layover) use. If you create an embed code for the same page or the whole project again, or in another iframe format, it reuses the same hash, so those embeds share one set of statistics.


Viewing embed statistics in Maglr


The Statistics page in Maglr counts embed visits separately from visits to the publication URL. To view the statistics of one embed:


  1. Open the project's statistics: in the project overview, point to the ... button on the project and click Statistics. When the project is open, you can also click Statistics in the sidebar.
  2. In the left bar, under Shared format, open the dropdown and select Shared as embed.
  3. Scroll to Page overview. Each row is one page shown through one embed. The grey line above the page title shows embed_ followed by the embed's hash.
  4. Match that hash with the hash in your embed code to find the embed you want.


To see only the traffic that came directly to the publication URL, select Shared as publication under Shared format instead.


Image: analytics overview in Maglr showing the statistics of the publication and its embeds separately


Good to know:


  • All embed types are counted: embeds that use an iframe and Automatic format (inject) embeds all appear on the Statistics page.
  • Domain filters leave out embeds: embed statistics are not included when you filter the Statistics page by domain. Filter by project instead.


Tracking embeds in Google Analytics or Google Tag Manager


Embeds use the Google Analytics or Google Tag Manager settings of the domain the project is published on. If the project is linked to more than one domain, the embed uses the settings of the first linked domain. To send embed traffic to your Google Analytics 4 property or Google Tag Manager container:


  1. In the top bar, go to Settings → Domain names and open the domain the project is published on.
  2. In Statistics & integration, turn on Google Analytics or GTM.
  3. Under Integration type, select Google Analytics or Google Tag Manager.
  4. Enter your GA4 code (starts with G-) or your GTM code (starts with GTM-).
  5. Click Save changes.


Which embeds use this code:


  • Embeds that use an iframe (every embed type except Automatic format (inject)) load the domain's Google Analytics or Google Tag Manager code inside the embed.
  • Automatic format (inject) embeds don't load the domain's Google Analytics or Google Tag Manager code, so their visits don't reach your GA4 property or GTM container. They are still counted on the Maglr Statistics page.
  • Embeds from a project that isn't on any domain don't load Google Analytics or Google Tag Manager code. They are still counted on the Maglr Statistics page.


In Google Analytics, an embed's visits are recorded under its own page URL, embed.maglr.com/ followed by the embed's hash, for example embed.maglr.com/a1b2c3d4e5. To see one embed's traffic, filter your reports on page location containing that hash. Embed traffic is counted separately from traffic to the publication URL.


Tracking embed events in your website's Google Tag Manager


When the website that shows your embed uses Google Tag Manager, embed codes that include Maglr's embed.min.js script push the embed's events into that website's GTM data layer. You can then use these events in your own GTM container. To set this up, see Track embed events with GTM inside your website.


This is different from loading a GTM container inside the embed itself, which you set on the domain in Maglr. For that setup, see Integrate Google Tag Manager.


Frequently asked questions


Are embed visits included in my publication's statistics?


No. In both the Maglr Statistics page and Google Analytics, visits to an embed are counted separately from visits to the publication URL. On the Statistics page, select Shared as embed under Shared format to see embed traffic, or Shared as publication to see traffic to the publication URL.


Do Automatic format (inject) embeds show up in my statistics?


Yes, on the Maglr Statistics page: Automatic format (inject) embeds are counted like other embeds. They don't load the domain's Google Analytics or Google Tag Manager code, so their visits don't appear in your GA4 property or GTM container.


Why don't my embeds show when I filter Statistics by domain?


Embed statistics are not recorded under your domain, so a domain filter on the Statistics page leaves them out. Filter by project instead, and select Shared as embed under Shared format.


Which domain's Google Analytics settings does an embed use?


An embed uses the Statistics & integration settings of the domain its project is published on. If the project is linked to more than one domain, the embed uses the settings of the first linked domain. A project that isn't on any domain loads no Google Analytics or Google Tag Manager code in its embeds.

Updated on: 22/10/2026