We were looking to use google adsense on an app or modulebut the service uses a site ownership verification that requires either a script or meta tag in the head or an Ads.txt file in the root dir. I tried using preloaded js to create a new meta tag and append it to the head:
but this is actually done inside the iframe component:
this seems to prevent the adsense crawler from being able to discover the tag.
I think ive got something sorta basic all kinds of confused if somebody could help me w my face .
does window in the preloaded js for an App and a Module both refer to the html root element? or does window when used in w an App refer to the same element react is rendering to which could be a html element or iframe if its embedded.... and that'd mean window and document from inside a module would always be within the context of its iframe and can never access the other chilfren of its parent?
heres a bonus twister: in a multi-page app, would window and document always refer to the same thing when used in the "preloaded js", "global js" and "page js" areas or will document change and always refer to the most granular scope? idk how to word that, granular might not be right XD... nested?
I just realized window.addEventListener() for the 'loaded' or 'DOMDocumentLoaded' events might give me access to the parent from both an app and module? all of this might just end up being only for the thought experiment , sorry if so.
I apologize for all the confusion, Retool is very unique in that the way that the HTML is created when building out the components of the window and document is kinda confusing and not super straightforward
I would love to know the answer to these questions as well, we might just need to set up a three way call with us and an engineer from the core data or UI team to give us a breakdown of how this process unfolds and how it differs for apps vs iframes vs multi-page apps.
But back to the crux of your post, I can make a feature request for Google Adsense support!