Note: jQuery isn't installed by Optimize by default. Any scripts that declare JavaScript variables, functions, or set cookies you use in Optimize, like jQuery or JavaScript libraries used in implementation or targeting.Note: the dataLayer variable should never be reassigned after the anti-flicker snippet (when used). The only items that should appear above the Optimize snippet are: If you're using Google Tag Manager to deploy Optimize, replace CONTAINER_ID with your Tag Manager container ID.įor optimal performance, place the Optimize snippet at the top of the tag on every web page you wish to optimize. Note: Replace CONTAINER_ID with your Optimize container ID. (function(a,s,y,n,c,h,i,d,e))(window,document.documentElement,'async-hide','dataLayer',4000, Ensure that your Optimize snippet or Tag Manager container immediately follows the anti-flicker snippet.Copy the full code below and add it to every page with Optimize as early in the as possible, but after any dataLayer declaration, if used.Page flicker occurs when a web page briefly appears with the browser's default styles before loading an external CSS stylesheet which re-renders it causing the restyled elements to momentarily 'jump' on the page. These visible changes are referred to as page flicker. In some instances, changes are made to elements that are already visible to the end user. Optimize displays variants to your website visitors by modifying the DOM (Document Object Model). This is accomplished by adding the anti-flicker snippet as the first script on your page(s). If you notice page flicker – despite following the steps above – the most effective way to mitigate it when loading Optimize is to temporarily hide the page while the Optimize container loads. If you can't install the anti-flicker snippet inline you should skip it altogether. The anti-flicker snippet should only be installed inline – directly on your web page – and never with a tag management system (TMS) or another asynchronous script.
0 Comments
Leave a Reply. |