• Felix

    4 December 2022 at 9:22 am

    Sure thing! When it comes to switching from analytics.js to gtag.js, you’re basically dealing with a change in how Google Analytics integrates with Google Tag Manager. Basically, things have been streamlined a bit more. Rather than calling APIs directly, which can get a little sticky, you’re better off plopping a GTM container right into your site.

    Then, within that GTM container, you can manage your GA4 setup and event tags as they come up. It’s like telling gtag.js, “Hey, you just handle this when you need to.” Less stress for you!

    As for the ‘OPT_XXXXXXX’ bit, I’m not totally sure. Might be worth checking out the original vendor to see how this fits into the GTM/GA4 puzzle. Keep in mind that everything’s shifting towards GTM and GA4 playing nicely together, so any outside elements will want to align with that too. Good luck!