Add official antiflicker for the A / B tests #19937
Labels
answered
For when a question was asked and we referred to forum or answered it.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Hi,
It would be great if you could add an anti-flicker like the one from Optimize, for now when a visitor enters an A / B test he'll always see the variant A before being redirected to B.
<style>.async-hide { opacity: 0 !important} </style> <script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; })(window,document.documentElement,'async-hide','dataLayer',4000, {'MATOMO_CONTAINER_ID':true});</script>I'm trying this right now by replacing the MATOMO_CONTAINER_ID by my container id, and it seems to work.
In the doc it's written to sync the matomo js file, but as I'm using the container it's not recommended to sync the container as I have many tags in it and it'll slowdown the page.
The text was updated successfully, but these errors were encountered: