使用gtag.js的Google Optimize页面隐藏代码段配置错误

时间:2018-08-07 18:31:12

标签: javascript google-optimize

它一直告诉我使用标签管理器容器ID,而不是google优化容器ID,但是我已经在使用标签管理器ID ...

    <!-- Page hiding snippet (recommended) -->
    <style>.async-hide { opacity: 0 !important} </style>
    <script>
    (function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;
    h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
    (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);
    })(window,document.documentElement,'async-hide','dataLayer',4000,{'GTM-redacted':true});
    </script>

      <!-- Global site tag (gtag.js) - Google Analytics -->
      <script async src="https://www.googletagmanager.com/gtag/js?id=UA-redacted-3"></script>
      <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-redacted-3', { 'optimize_id': 'GTM-redacted'});
      </script>

知道这是怎么回事吗?

0 个答案:

没有答案