戻る

Google Analytics tracking code

シェア:

100% of Google Analytics properties have been transferred to Universal Analytics, and all new properties will be Universal Analytics properties. If you are still using a legacy tracking library, such as ga.js, it is strongly recommended that you upgrade to use a Universal Analytics tracking library.

WHAT TO DO?

1. Verify the tracking code in your Portfoliobox admin panel under Settings → Statistics. If the code is similar to the new code below, you are already using the updated code and don't need to take any further action. If the code looks like the old one below, follow the steps 2 and 3. 


Old code (ga.js)

 <script type='text/javascript''>
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-Y']);
  _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>

New code (analytics.js)

<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','ga');

  ga('create', 'UA-XXXXX-Y', 'auto');
  ga('send', 'pageview');

</script>

The string 'UA-XXXXX-Y' is your tracking ID. 

2. Copy the code in your Google Analytics account under Admin → Choose your property → Tracking info → Tracking code.

3. In your Portfoliobox admin panel under Settings → Statistics, delete the old code and paste the new one. Don't forget to save. Allow 24h for the new settings to be effective. 

クリエイターのために作られたオンラインポートフォリオ

プロが必要とするすべてのツールがここに

  • ダイナミックグリッド
  • 偶数行
  • 黄金比
  • 四角比
  • 中央揃え
  • パズル
  • ランダム
  • 水平位置
  • 水平位置 2
  • 水平位置 3
  • 垂直位置
  • 2-1
  • 3-1

無料で開始する

今すぐポートフォリオサイトを作成

独自のポートフォリオを構築する