Is it possible to use Google Analytics with the Baserow Application Builder?
I set everything up and added the script to the app builder using the iframe element. However, it says the code is not found on the site. I made sure to publish the change.
It should be possible when you add an iFrame element in a Multi-page header with the following code
<script>
const parentDocument = window.parent.document;
const script1 = document.createElement('script');
script1.src = 'https://www.googletagmanager.com/gtag/js?id=<your_id_here>';
script1.async = true;
const script2 = document.createElement('script');
script2.text = ` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '<your_id_here>'); `;
parentDocument.head.appendChild(script1);
parentDocument.head.appendChild(script2);
</script>
This script ensures that the Google Analytics script is added to the element of the parent page.