简体   繁体   中英

Set secure param in Google Analytics Tracking Code

I'm trying to set secure=true in Google Analytics cookies: utma, utmb, utmc, utmz, utmv y utmx like I did in Rails app with:

cookies[:web] = {:value => 'XXXXXXXX', :secure => true }

Should I change the next Google Analytics Tracking Code? Is it possible?

<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXXX']);
    _gaq.push(['_trackPageview']);
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0];   s.parentNode.insertBefore(ga, s);
    })();
  </script>

否。我认为您无需更改Google Analytics(分析)跟踪代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM