• Resolved kingpin123

    (@kingpin123)


    i can’t speak english well. please understand me^^

    i want to use google optimize. but they said i need to paste code in analytics track code like that to use it.

    <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,’script’,’https://www.google-analytics.com/analytics.js&#8217;,’ga’);
    ga(‘create’, ‘UA-48098010-3’, ‘auto’);
    ga(‘require’, ‘GTM-56DVL6J’);
    ga(‘send’, ‘pageview’);
    </script>

    and they said i need to paste it just before analytics track code.

    <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,
    {‘GTM-56DVL6J’:true});</script>

    how can i do it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi There,

    Please see the Optimize section under Tracking Code -> Integration screen.

    You’ll want to paste your GTM-56DVL6J code in the Container ID box.

    Thanks,

    -Jay

    Thread Starter kingpin123

    (@kingpin123)

    ohh it is so simple. thank you!!

    I did exactly that and am still receiving error messages indicating the Google Optimize and Google Analytics codes are not found.

    “Optimize plugin not found”
    The web page page doesn’t have Optimize plugin for the container ID (GTM-M8623FP) installed. You can still use the visual editor to create variants but you can’t use Preview mode to test them and visitors won’t see your experiment. To run an experiment you must first install Optimize .

    Analytics pageview not detected
    This page isn’t sending pageview hits to Google Analytics property (UA-21781925-1) configured for this experiment. You won’t be able to measure usage of your site or monitor performance of Optimize experiments. Make sure that your Analytics tracking code (either analytics.js or gtag.js ) is set up correctly.

    On a side note, our analytics has been up and running for at least a year and is working properly.

    Any suggestions on what might be causing the error in WP’s Google Analytics Dashboard?

    Hi @firedexadmin what’s the URL in question?

    Are you logged in as an administrator? We don’t track logged in users by default so to Google it would appear to not be loading in the test when in reality it for everyone except admins.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to use google optimize’ is closed to new replies.