Title: Bug with Universal Analytics
Last modified: September 1, 2016

---

# Bug with Universal Analytics

 *  Resolved [Romanceor](https://wordpress.org/support/users/romanceor/)
 * (@romanceor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/bug-with-universal-analytics/)
 * Hello,
    When using Universal Anlaytics, there is a bug in the tracking code, 
   where the “http” lacks from it. But when going back to classical analytics, the
   http appears again. Please see both codes for comparaison :
 *     ```
       <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','//www.google-analytics.com/analytics.js','ga');
         ga('create', 'UA-XXXXXX-11', 'auto');
         ga('require', 'displayfeatures');
         ga('send', 'pageview', {'anonymizeIp': true});</script>
       ```
   
 *     ```
       <script type="text/javascript">
         var _gaq = _gaq || [];
         _gaq.push(['_setAccount', 'UA-XXXXXX-11']);
         _gaq.push(['_trackPageview'], ['_gat._anonymizeIp']);
   
         (function() {
           var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
           ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
           var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
         })();
       </script>
       ```
   
 * Could you please confirm that this is a plugin’s bug, and that you can correct
   it ?
 * Thank you.
 * [https://wordpress.org/plugins/google-analytics-dashboard-for-wp/](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Alin Marcu](https://wordpress.org/support/users/deconf/)
 * (@deconf)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/bug-with-universal-analytics/#post-7545468)
 * Hi,
 * That’s a network path reference and the protocol is intentionally omitted.
 * While this is not a bug, considering that SSL is now recommend, I think HTTPS
   should be always used. It will be available in the next update.
 * Thanks for the heads-up!
 *  Thread Starter [Romanceor](https://wordpress.org/support/users/romanceor/)
 * (@romanceor)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/bug-with-universal-analytics/#post-7545469)
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bug with Universal Analytics’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-dashboard-for-wp/assets/icon.svg?rev=2243225)
 * [ExactMetrics - Google Analytics Dashboard for WordPress (Website Stats Plugin)](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Romanceor](https://wordpress.org/support/users/romanceor/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/bug-with-universal-analytics/#post-7545469)
 * Status: resolved