Feature #1053
open
Google Optimize for A/B tests
Description
Данный фрагмент кода скрывает "мерцание" страницы при запуске теста в Google Optimize.
Чтобы его установить:
1. Скопируйте код и добавьте его на каждую страницу сайта сразу после блока <HEAD>, но после любого объявления dataLayer, если оно используется.
2. Убедитесь, что код GTM следует сразу за фрагментом кода Google Optimize
<HTML>
<HEAD>
<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,
{'OPT_CONTAINER_ID':true});</script>
Updated by Yevgen Voronetskyy over 6 years ago
- Status changed from New to In Progress
We should implement this only in context of #1048 - we need to have 2 index.html
Ask NetPeak about the tech aspects of new index URL-pattern:- /?v1
- /?v2
or
- index.html
- indexNew.html
Updated by Yevgen Voronetskyy over 6 years ago
- Assignee changed from Yevgen Voronetskyy to Anonymous
We don't know yet how the traffic routing will be implemented - directly in our front web-server with some sticky session mechanism or by Google Optimize solution.
Waiting for NetPeak investigation to finish this estimate.
Updated by Anonymous over 6 years ago
Test TEST-A/B (redirect)
http://prntscr.com/oiypsa
Updated by Anonymous about 6 years ago
Olena Skrypek wrote:
Данный фрагмент кода скрывает "мерцание" страницы при запуске теста в Google Optimize.
Чтобы его установить:
1. Скопируйте код и добавьте его на каждую страницу сайта сразу после блока <HEAD>, но после любого объявления dataLayer, если оно используется.
2. Убедитесь, что код GTM следует сразу за фрагментом кода Google Optimize
<HTML>
<HEAD><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, {'OPT_CONTAINER_ID':true});</script>
Did you put this fragment oun prod?
Updated by Denys Bezuhlyi about 6 years ago
- Assignee changed from Anonymous to Anonymous
- % Done changed from 0 to 100
Updated by Denys Bezuhlyi about 6 years ago
We have removed anti flicker code, due to business complaints