(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-7857894-16', 'auto', 'clientTrackerMain', {'alwaysSendReferrer': true}); // ALL ga('clientTzrackerMain.send'); ga('create', 'UA-7857894-18', 'auto', 'clientTrackerSub', {'alwaysSendReferrer': true}); // 売買+投資一覧 ga('clientTrackerSub.send', 'pageview'); ga('create', 'UA-7857894-21', 'auto', 'clientTrackerSubProp', {'alwaysSendReferrer': true}); // 売買専用 ga('clientTrackerSubProp.send', 'pageview'); // jquery 依存 // Aタグ イベントトラッキング $(function(){ // aタグ クリックイベントトラッキング $(document).on('click', 'a', function(){ var $this = $(this); // 広告バナーエリア用 if ( $this.closest('.bannerArea').length > 0 ) { var area = 'banner'; if ( $('body').attr('area') != undefined ) { area += '_' + $('body').attr('area'); }; var prop = $('body').attr('prop'); if ( $this.closest('.bannerArea').attr('id') !== undefined ) { prop += '_' + $this.closest('.bannerArea').attr('id'); } } // 広告バナー以外のaタグ else { var area = 'notset'; if ( $('body').attr('area') != undefined ) { area = $('body').attr('area'); }; var prop = 'notset'; if ( $('body').attr('prop') != undefined ) { prop = $('body').attr('prop'); if ( $('body').attr('vtype') != undefined ) { prop += '_' + $('body').attr('vtype'); } }; } var imgpath = ''; // 画像あり if ( $this.find('img').length> 0 ) { imgpath = $this.find('img').attr('src'); } else { imgpath = $this.text(); if ( $this.attr('class') != undefined ) { imgpath += '(' + $this.attr('class') + ')'; }; } ga( 'clientTrackerMain.send' , 'event' , area , prop , imgpath ); ga( 'clientTrackerSub.send' , 'event' , area , prop , imgpath ); ga( 'clientTrackerSubProp.send' , 'event' , area , prop , imgpath ); }); });