*** UPDATE ***
Troubleshooting:
(1) We disabled all of our plugins, except yours and still got the console error when we enabled “Enable Google Optimize Async Hide” within Analytify’s Settings > Tracking > Google Optimizer (with no other data in the noted fields).
Details (Plugin Setting): https://prnt.sc/-jIyuMvW_LmW
Details (Console Error): https://prnt.sc/d-wqL9feTJnY
(2) When we entered a value in the “Google Optimize Async Hide Time” field (say, 200), the console error disappeared.
Details (Plugin Setting): https://prnt.sc/C01EqeBPClzO
Details (No Console Error): https://prnt.sc/5EbcXBbYdTWN
Root Cause:
A detailed inspection of the console error revealed that the code snippet associated with “Google Optimize Async Hide” depends on a “Hide Time” for it to work properly. The code snippet — developed by Google — is given below. Please notice the “Hide Time” of 200 we picked above. Without a selected hide time value, the code snippet transforms itself to “, ,” which is what caused the console error. In other words, Google Analytics always expects a value in this field.
<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',200,
{'':true});</script>
Analysis and Solution:
So, in short, the console error is expected if the fields provided in your “Google Optimizer Async Hide” module are not filled out properly.
You should be able to replicate the above. Otherwise, you’re not following properly what we shared above.
Case closed ??