Adding GTM on iframe for mobile webpage - iframe

My website pages are loaded in an iframe when the page is viewed on mobile.
I am trying to add GTM to the iframe but when I inspect it in developer mode, it shows that the iframe src is https://xxxyyyzzz.xxx/aabbccdd, which is the page itself. GTM is already installed on this page (and all pages) - Looking over the internet, people are saying that I should add a new GTM container snippet for the child frame specifically. But I have 2 issues:
I cannot seem to find where the child frame is located
The page loading in the iframe contains already my GTM script and no script snippets
The events are firing on desktop but not on mobile so I'm missing something but not sure what!
I'd love to have some help on this <3

Related

Tag assistant shows duplicate GTM tags

I have a small website where I used Barba.js to create smooth transition between pages. So it won't load a new page completely fresh, but rather load the content in background using AJAX and add it to the existing document.
So to fire Google analytics page view event, I use History change trigger in GTM. And it seems to be working fine. in GA it is recording the page views correctly. But in Google Tag Assistant, it keeps increasing the count of GTM tag on every page load. And I have checked it is not adding GTM tag on page loads. It only adds a main content container to the document which doesn't contain GTM tag.
Here is the TAG Assistant screenshot after a 3rd page load :
The Google analytics page view event is fired 3 times which is correct, but the GTM is also recorded 3 times.
This is a common behavior of Google Tag Assistant with single page website. The plugin is unable to detect single-page transitions correctly, so it will report the GTM container loading for each new URL when in fact the container has only loaded once.
To understand if it is not actually loaded multiple times, try to open the Network requests of your browser's developer tools and look for requests for gtm.js, If you only see one per page loaded there are no problems.

Overwrite css style with GTM before page loads

I have a section of my website that has a map inside a div that has an id with "display:none;" for mobile users. I would like to use Google Tag Manager and display that div with the map but I noticed that using a trigger by pageview is kinda slow when loading. The page loads and the div eventually displays the map but it shows broken since the js already loaded.
Is there a faster way to trigger a custom html tag with GTM other than pageview? Thank you
You cannot do anything in GTM before page load, since GTM itself needs to be downloaded and executed first (and due to async loading you cannot exactly tell when a tag is being executed). So no, there is now way.

Webpage in Iframe is showing without css?

I have an IFRAME in a page. And i have loaded another web page in that IFRAME.
But this newly added web page is not showing properly, i.e., web page is displaying without css.
If i open same web page in another window it displays normally with css.
I have searched a lot but haven't found any solution to resolve it.
Any Suggestions,
Thanks
Is the webpage from another domain?
Does the webpage of the iframe start with http while the parent page is https? Make sure the protocols are the same.

How can I tell if a website is firing virtual page views?

Is there a way to know how many page views are being fired, including virtual pageviews, when a browser lands on a page?
I'm investigating a severe bounce rate drop that is pretty clearly a technical issue since there has been no content or layout changes on the site.
We do have:
2 Google Analytics tags (Classic and Universal) throughout the site;
Optimizley is set up and testing.
Could this cause the problem?
Note, there is currently no event tracking on the site, just the base analytics tags.
Is there a way to see what tags (assuming that's it) are causing the issue? I am using httpfox (like fiddler) and added filter "utm" to see what's going on. Sure enough, 2 GA tags firing plus 2 dart pixels.
Would those cause page views though?
To check what is firing on the entire page. Download firbug for firefox and add the "omnibug" extension. The omnibug extension should be in the firefox firebug window when you open it.
When you go the omnibug in the firefix panel, you will see EVERYTHING THAT IS FIRING!
Is that what you are looking for?
To check what pageviews are firing correctly VERY QUICKLY in Google analytics. Do the following;
Make sure the google analytics code you have is on the page you want to track
Make sure your IP is not excluded or filtered out of the analytics profile
Login to your google analytics account
Go to Real-Time section on the left hand sidebar.
Click on Content
Go to your site and click on the link or go to the virtual pageview page you added the code to and then watch if that link shows up in the real-time -> content section.

SEO Friendly iFrames-- Non-blocking to parent page from downloading its elements

I am planning to include iFrame in my wordpress site homepage for one reason-- improve homepage speed for SEO purposes. Correct me if I'm wrong, I found out that iframe blocks loading on parent page (old browsers perhaps). Now, here's the idea: I want to divide my homepage into two. The top would be the parent page's light elements and below would be an iframe showing recent posts with heavy elements. I want to load the parent's elements first before the iframe's. Also, prevent browser from showing busy indicator which I intend to use GIF image only on the iframe.
Summary:
Page with SEO friendly iframe.
Loads parent elements first w/o being blocked by iFrame
iframe loads after loading parent page's elements
Prevent showing browser's busy indicator while loading the iframe
Help please.
i dont think there's something like seo friendly iframes. Yes of course in last year google started indexing iframes but it's still worst than normal. (problems with links for iframe sites, google dont know how to index it, or with the same address or with other). It is better to have slow speed, than having iframes(and i am sure of that:) )
If you use a sitemap the spiders will consider the origin page of the iframe as part of the website structure, provided the origin page is hosted in the same domain. Although, the page indexed appearing in a SERP will be the origin page, not the one holding the iframe. This could be confusing to the reader.

Resources