Meta Tags and Root Dir Files?

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:
image

but this is actually done inside the iframe component:
image

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 :confused: face :smile:.

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 :thinking:, sorry if so.

Hello @bobthebear!

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 :sweat_smile:

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!

1 Like

insert shocked Pickachu face here :rofl:

that'd be awesome if we could get a three way call or email like that to understand what's going on and what it means for us as far as js goes and what limitations there might be by design.

If Google Adsense support is added, it makes my questions right now a bit pointless, but I think the answer could be helpful in providing others with temporary solutions for any other metatag based services and/or standards found lying around interwebs :innocent:

Yes definitely!

I just pinged some folks internally, I am going to see what I can do to put together something along the lines of a special office hours that would be an informational session for community members and support engineers to get a debrief on the inner workings of Retool as there are many meta tag based services that users should be able to take advantage of.

Will post any news I hear on this plan to this thread :crossed_fingers:

1 Like

backlinking :wink:

1 Like