Search code examples
javascriptgoogle-tag-manager

Do I need an anti-flicker snippet for GA4?


I am migrating a site from universal analytic to GA4. I inherited this site, and I did not connect universal analytic. The site code now includes an anti-flicker snippet. It is recommended by Google, and apparently there were reasons to add it. Both Google tag and event tracking tags have changed in GA4. However, I can't find an anti-flicker snippet equivalent for GA4. Is it needed at all? Or is it no longer necessary for GA4?

I couldn't find any definitive information on google.


Solution

  • It is using by Google Optimize. Check if the website is still using it or not.

    However this service will end the service in September this year. So migrate it to another AB Test tool is a better option.

    These kind of Anti Flicker snippet are common to see for AB Test tool. Because most of the AB Test will change the DOM or the content.

    It will help the user to see the changed version directly rather than see original version first and changed to variant version