PageSourceSearch

http://higashimokuzai.co.jp/js/my_js/ua_log.js

js higashimokuzai.co.jp collected 2026-10-08 05:27:30 UTC 41,476 bytes, 981 lines download raw bytes

1!function ($) {
2	$(function () {
3
4        var created = '';
5        var dlFlg = false;
6
7        //analisys.jsよりまるっとコピー
8        var $window      = $(window),
9            width        = $window.width(),
10            height       = $window.height(),
11            //DS
12            //$centerArea  = $('#middle-area > div.center-area');
13            //CS
14            $centerArea  = $('#MainPanel');
15
16        //CS
17        var $params      = $('body');
18        //DS
19        //var $params      = $('#params');
20        var siteType     = ($params.data('device') == 'smart')? 'SP' : 'PC';
21        var $sectionType = $('section.section .block-area');
22
23        //CS
24        var $bg      = $('body');
25        //DS
26        //var $bg          = $bg;
27        
28        var pageId     = $params.data('page-id');
29        //DS
30        // if ($sectionType.length) {
31        //     pageId = $bg.data('page-id');
32        // }else if($('#GlForm').length){
33        //     pageId = $('body').data('page-id');
34        // }
35        var $section     = $bg.find('section.section');
36
37        var moviePlayFlg = false;
38        var moveAutoPauseFlg = false;
39
40        var YTPlayFlg = false;
41        var YTAutoPauseFlg = false;
42
43        //$.cookie.json = true;
44        //$.cookie.raw = true;
45
46
47        //二重送信防止
48        var sendFlg = false;
49
50        //二重クリック防止
51        //var clickFlg = false;
52
53        //CS独自 フォームのステップ
54        var cs_form_step = '';
55
56        var uniquePageId = public_uuid + $.now();
57        var ua           = window.navigator.userAgent;
58        var winSize      = width + ',' + height;
59        var scroll_y     = $window.scrollTop();
60        var scroll_x     = $window.scrollLeft();
61
62        var another_tab_flg = false;
63
64        //var UserActionObject = {};
65
66        
67        //クリックログ取得
68        //$(document).on('click tap',function(e){
69        //IE,firefoxでバブリングがうまく行かず、要素に対するクリックイベントが発火しないため、要素自体にイベントつける
70        //divに関してはfirstEventAddで
71        // $('a,button,input').on('click',function(e){
72        //     //
73        //     //onclick属性がついている場合は、すでにイベントを割り込ませてあるので(firstEventAdd)クリックイベントでは発動させない
74        //     if($(this).attr('onclick') == undefined){
75        //         $.getClick(e);
76        //     }
77        // });
78        //動的に追加したものにイベントがつけられない場合があるため
79        $(document).on('click tap','a,button,input', function(e) {
80        //onclick属性がついている場合は、すでにイベントを割り込ませてあるので(firstEventAdd)クリックイベントでは発動させない
81            if($(this).attr('onclick') == undefined){
82                $.getClick(e);
83            }
84        });
85
86        $("video").on({
87            "play":function(e){
88
89                var $_this = $(this);
90
91                var id1   = $_this.parents('.block').data('block-id');
92                var id2   = $_this.parents('.record').data('record-id');
93
94                var attrs = $(this).get(0).attributes;
95                var attrsStr = '<video '; 
96
97                for (var i = 0; i < attrs.length; i++) {
98                    attrsStr += attrs[i]['name'];
99                    if(attrs[i]['value'] != ''){
100                        attrsStr += "='" + attrs[i]['value'] + "'";
101                    }
102                    attrsStr += " ";
103                }
104
105                attrsStr += '>';
106
107                if($(this).attr('autoplay') == undefined || moviePlayFlg){
108                    var data = {
109                        'event'   :'play',
110                        'page_id' :pageId,
111                        'id1'     :id1,
112                        'id2'     :id2,
113                        'element' :attrsStr,
114                    };
115                    $.insertUAObj('video',data);
116                }
117                moviePlayFlg = true;
118            },
119            "ended":function(e){
120                moveAutoPauseFlg = true;
121            },
122            "pause":function(e){
123
124                var $_this = $(this);
125
126                var id1   = $_this.parents('.block').data('block-id');
127                var id2   = $_this.parents('.record').data('record-id');
128
129                var attrs = $(this).get(0).attributes;
130                var attrsStr = '<video '; 
131
132                for (var i = 0; i < attrs.length; i++) {
133                    attrsStr += attrs[i]['name'];
134                    if(attrs[i]['value'] != ''){
135                        attrsStr += "='" + attrs[i]['value'] + "'";
136                    }
137                    attrsStr += " ";
138                }
139
140                attrsStr += '>';
141
142                setTimeout(function(){
143                    var media_id = 0;
144                    if(!moveAutoPauseFlg){
145                        var data = {
146                            'event'   :'pause',
147                            'page_id' :pageId,
148                            'id1'     :id1,
149                            'id2'     :id2,
150                            'element' :attrsStr,
151                        };
152
153                        $.insertUAObj('video',data);
154                    }
155                    moveAutoPauseFlg = false;
156                }, 100);
157            },
158        });
159
160       
161        $('form').on('submit',function(e){
162
163             //二重送信防止
164            if(!sendFlg){
165
166                var $_thisForm = $(this);
167
168                //非公開ユーザーログイン
169                //DS
170                //if($_thisForm.attr('id') == 'CloseUserIndexForm'){
171                //CS
172                if($_thisForm.attr('id').match(/\?login\=trueForm/)){
173                    //DS
174                    //var data = {'close_user_name':$('#inp-username').val()};
175                    //CS
176                    var data = {'close_user_name':$('.username').val()};
177                    $.insertUAObj('close_user_login',data);
178                //検索ログ取得
179                //DS
180                // }else if($_thisForm.attr('id') == 'searchIndexForm'){
181                //     var data = {'search_cond':$('#inp-search_word').val()};
182                //     $.insertUAObj('search',data);
183                //不動産(地図含む)、自動車検索
184                //DS
185                //}else if($_thisForm.hasClass('automobile-form') || $_thisForm.hasClass('estate-form') || $_thisForm.hasClass('gmap-box')){
186                //CS
187                }else if($_thisForm.parents('.type107').length || $_thisForm.parents('.type108').length){
188
189                    var search_serialize = $_thisForm.serializeArray();
190                    var search_cond = {};
191
192                    for(var item in search_serialize){
193
194                        var name = search_serialize[item]['name'];
195                        var val  = search_serialize[item]['value'];
196
197                        search_cond[name] = val;
198                    }
199
200                    var id1   = $_thisForm.parents('.block').data('block-id');
201                    var id2   = $_thisForm.parents('.record').data('record-id');
202
203                    var data = {
204                        'page_id' :pageId,
205                        'id1'     :id1,
206                        'id2'     :id2,
207                        'search_cond':search_cond
208                    };
209                    $.insertUAObj('record_search',data);
210                //お問い合わせ(入力フォーム)
211                //DS
212                //}else if($_thisForm.hasClass('type019-form')){
213                }else if($_thisForm.parents('.type022').length){  
214                    var fid = $('#FID').val();
215                    var contact_serialize = $_thisForm.serializeArray();
216                    var contact_form = {};
217                    var item_list = {};
218
219                    for(var item in contact_serialize){
220
221                        var name = contact_serialize[item]['name'];
222                        var val  = contact_serialize[item]['value'];
223
224                        var item_name = $("[name='"+name+"']").closest('tr').find('.th2').text();
225                        if(item_name != ''){
226                            item_list[item_name] = val;
227                        }
228
229                        contact_form[name] = val;
230                    }
231
232                    var step = 'confirm';
233                    if(cs_form_step != ''){
234                        step = cs_form_step;
235                    }
236
237                    var data = {
238                        'page_id'    :pageId,
239                        'id1'        :id1,
240                        'id2'         :id2,
241                        'step'        :step,
242                        'fid'         :fid,
243                        'item_list'   :item_list, 
244                        'contact_form':contact_form
245                    };
246                    $.insertUAObj('contact',data);
247                }
248
249
250
251                //e.preventDefault();
252                $.sendDataCheck($_thisForm);
253            }
254
255        });
256
257        //ページを離れるときにsubmit
258        $window.on('beforeunload pagehide unload',function(){
259            $.sendDataCheck();
260        });
261
262        // $('.media-load-iframe').on('load',function(){
263        //     //console.log('load');
264        //     //console.log($(this));
265        //     $(this).contents().find("body").on("click", function(e){
266        //         //console.log('body');
267        //     });
268        // });
269
270        $.extend({
271            getClick:function(e,flg){
272
273                //発火元取得
274                if(flg){
275                    var $_this = e;
276                }else{
277                    var $current = $(e.currentTarget);
278                    if($current.context !== undefined && $current.context.activeElement !== undefined){
279                        var $_this = $($current.context.activeElement);
280                    }else{
281                        var $_this = $current;
282                    }
283
284                }
285
286                var contents   = 'common';
287                var id1        = 0;
288                var id2        = 0;
289                var position   = $.getPosition(e);
290
291                if($_this.attr('href') !== undefined){
292                    var myHref     = $_this.attr('href');
293                }else{
294                    var myHref     = '';
295                }
296
297                if( $_this.prop("tagName") != undefined){
298                        //タグ
299                    var tagName  = $_this.prop("tagName").toLowerCase(); 
300
301                    //bodyの中で何番目の要素か(index0から始まる)
302                    var index = $('body ' + tagName).index($_this);
303
304                    //bodyのクリックイベントなどは通さない
305                    if(index >= 0){
306                        //eqも0から始まる
307                        var selector = 'body '+tagName +':eq(' +index+ ')';
308
309                        //atributesの取得
310                        var attrs = $(selector).get(0).attributes;
311                        var attrsStr = '<'+tagName+' '; 
312
313                        for (var i = 0; i < attrs.length; i++) {
314                            //attrsStr[attrs[i]['name']] = attrs[i]['value'];
315                            attrsStr += attrs[i]['name'] + "='" + attrs[i]['value'] + "' ";
316                        }
317
318                        attrsStr += '>';
319
320                        //レコード
321                        //DS
322                        //if($_this.parents('.record').length){
323                        //CS
324                        if($_this.parents('#ContentsArea').length){
325
326                            contents = 'record';
327
328                            id1    = $_this.parents('.block').data('block-id');
329                            id2   = $_this.parents('.record').data('record-id');
330
331                            //ファイルダウンロード
332                            if(myHref !== undefined && myHref.match(/\?file\=/)){
333                                //ファイルダウンロードでbeforeunloadが走るので処理を通さないように
334                                dlFlg = true;
335
336                                setTimeout(function() {
337                                    dlFlg   = false;
338                                    sendFlg = false;
339                                },1000);
340                            }
341                        //パーツ
342                        //DS
343                    // }else if($_this.parents('.parts').length){
344                        //CS
345                        }else if($_this.parents('.SideArea').length || $_this.parents('#HeaderArea').length || $_this.parents('#HeaderArea').length || $_this.parents('#DownArea').length || $_this.parents('#FooterArea').length){
346
347                            var $parts = $_this.parents('.parts');
348
349                            contents = 'parts';
350
351                            if($parts.attr('data-parts-id') !== undefined){
352                                id1   = $parts.data('parts-id');
353                                //selector  += ".parts[data-parts-id='"+id1+"'] ";
354                            //SPヘッダーフッター
355                            }else if($parts.attr('id') !== undefined){
356                                id1   = $parts.data('id');
357                                //selector  += "#" + $parts.attr('id') + "[data-id='"+id1+"'] ";
358
359                            }
360
361                            //レコードがある場合(リンクや地図)
362                            if($_this.parents('.parts-record').length){
363                                id2        = $_this.parents('.parts-record').data('record-id');
364                                //selector   += ".parts-record[data-record-id='"+id2+"']";
365                            }
366                        }
367
368                        data = { 
369                            'contents':contents,
370                            'element' :attrsStr,
371                            'x'       :position['x'],
372                            'y'       :position['y'],
373                            'page_id'  :pageId,
374                            'id1'     :id1,
375                            'id2'     :id2,
376                            'selector':selector,
377                        };
378
379                        var notClickFlg = false;
380
381                        //CS独自 フォームのstep
382                        if(tagName == 'input' && $_this.attr('type') != undefined && $_this.attr('type') == 'submit'){
383                            if($_this.attr('name') != undefined){
384                                var name = $_this.attr('name');
385                                if(name.match(/\[confirm\]/)){
386                                    cs_form_step = 'confirm';
387                                }else if(name.match(/\[send\]/)){
388                                    cs_form_step = 'complete';
389                                }else if(name.match(/\[back\]/)){
390                                    cs_form_step = 'return';
391                                }
392                            }
393                        }
394
395                        //console.log($_this.attr('onclick').length);
396                        //お問い合わせ(確認フォーム)
397                        if($_this.attr('onclick') !== undefined){
398
399                            if( $_this.attr('onclick').match(/type019\_forms/)){
400                                notClickFlg = true;
401
402                                var fid = $_this.attr('onclick').match(/fid\=([a-z0-9]{32})\//);
403                                if($_this.attr('onclick').match(/step\=form/)){
404                                    var data = {
405                                        'page_id'    :pageId,
406                                        'id1'        :id1,
407                                        'id2'        :id2,
408                                        'step'       :'return',
409                                        'fid'        :fid[1]
410                                    };
411                                }else if($_this.attr('onclick').match(/step\=confirm/)){
412                                    var data = {
413                                        'page_id'    :pageId,
414                                        'id1'        :id1,
415                                        'id2'        :id2,
416                                        'step'       :'complete',
417                                        'fid'        :fid[1]
418                                    };
419                                }
420                                $.insertUAObj('contact',data);
421                            // $.sendDataCheck($_this);
422                            }
423                        }
424
425                        //非公開ユーザーログアウト
426                        //DS
427                        //if($_this.hasClass('logout')){
428                        //CS
429                        if(myHref.match(/\/logout\//)){
430                            notClickFlg = true;
431                            var data = {'close_user_name':closeUserName};
432                            $.insertUAObj('close_user_logout',data);
433                        }
434
435                        if(!notClickFlg){
436                            $.insertUAObj('click',data);
437                            //外部リンクたたかれたときの対応
438                            if(myHref != '' && tagName == 'a' && $_this.attr('target') != undefined && $_this.attr('target') == '_blank'){
439                                another_tab_flg = true;
440                                $.sendDataCheck($_this);
441                            }
442                        }
443                    }
444                }
445            },
446            //onclick属性発動の前にクリックイベントをつけたいため
447            firstEventAdd:function() {
448
449                //CS
450                //こちらの処理はバージョンの違いによってイベントが取得できないため、get_uuid.tplへ移植
451                //DS
452                //無駄にイベントをつけないよう、イベントがついているdivだけにクリックイベントをつける
453                // $('div').each(function(index){
454                //     var events = $._data($(this).get(0), "events");
455                //     if(events !== undefined){
456                //         if(events.click !== undefined){
457                //             if($(this).attr('id') == undefined || ($(this).attr('id') !== undefined && $(this).attr('id') != 'bg')){
458                //                 $(this).on('click tap',function(e){
459                //                     $.getClick(e);
460                //                 });
461                //             }
462                //         }
463                //     }
464
465                // });
466
467                //onclick発動前に、クリックデータを取得するために、クリックデータ取得処理を割り込ませる
468                $('a[onClick],button[onClick],input[onClick]').each(function(){
469                    var $target = $(this);
470                    var onclick = $target.attr('onclick');
471                    var addOnclick = '$jq.getClick($jq(this),true); ' + onclick; 
472                    $target.attr('onclick',addOnclick);
473                });
474            },
475            sendDataCheck:function($elem){
476                //二重送信防止
477                if(!sendFlg){
478
479                    sendFlg = true;
480
481                    if(dlFlg === false){
482
483                        if(Object.keys(UserActionObject).length){
484                            $.sendData($elem);
485                        }
486
487                    }
488                } 
489            },
490            getDate: function() {
491                var date2 = new Date();
492                var YY2 = date2.getFullYear();
493                var MM2 = ('0' + (date2.getMonth() + 1)).slice(-2);
494                var DD2 = ('0' + date2.getDate()).slice(-2);
495                var H2 = ('0' + (date2.getHours())).slice(-2);
496                var i2 = ('0' + (date2.getMinutes())).slice(-2);
497                var s2 = ('0' + (date2.getSeconds())).slice(-2);
498
499                return YY2 +'/'+ MM2+'/'+ DD2 + ' ' + H2 + ':' + i2 + ':' + s2;
500            },
501            insertUAObj:function(type,data){
502
503                var time = $.getDate();
504
505                var key = Object.keys(UserActionObject).length;
506
507                data['type']    = type;
508                data['created'] = time;
509
510                //既存処理でクリックイベントが2回走るところがあったã
510®ã§ã€åŒæ™‚刻(秒)に同じタイプの処理がはいれば、2回目以降はとらない
511                var noInsert = false;
512                //divとaがかぶるなどして、イベントが同時に走ることがあるので、一旦すべてのログを取得します
513                // if(type == 'click'){
514                //     for (var i = 0; i < key; i++) {
515                //         if(UserActionObject[i]['type'] == type && UserActionObject[i]['created'] == time){
516                //             noInsert = true;
517                //         }
518                //     }
519                // }
520
521                
522                if(type == 'click'){
523                    for (var i = 0; i < key; i++) {
524                        if(UserActionObject[i]['type'] == type && UserActionObject[i]['created'] == time && UserActionObject[i]['element'] == data['element']){
525                            noInsert = true;
526                        }
527                    }
528                }
529                
530                if(!noInsert){
531                    UserActionObject[key] = data;
532                }
533        
534                
535            },
536            sendData:function($elem){
537
538                modified = $.getDate();
539
540                var sendObj = {};
541                var url     = location.href;
542
543                sendObj['queryParameters'] = {
544                        serialno:Serial,
545                        uuid    :public_uuid,
546                        url     : url,
547                        data    :JSON.stringify(UserActionObject),
548                        created :created,
549                        modified:modified,
550                }
551
552                $.ajax({
553                    type	: "POST",
554                    cache	: false,
555                    data	: JSON.stringify(sendObj),
556                    async	: false,
557                    url     : 'https://9e2xkh9f1e.execute-api.ap-northeast-1.amazonaws.com/v1/putActionData',
558                    contentType:'application/json',
559                    dataType:'json',
560                    success	: function(data) {
561                         //console.log('success');
562                        // console.log(JSON.stringify(data));
563
564                    },error : function(data){
565                        // console.log('error');
566                        // console.log(JSON.stringify(data));
567                    },complete:function(data){
568                        //console.log('complete');
569                        if($elem && $elem.length){
570                            //タグ
571                            var tagName  = $elem.prop("tagName").toLowerCase(); 
572                            if(tagName == 'form'){
573                                $elem.submit();
574                            }
575                        }
576                    }
577                });
578
579                if($elem && $elem.length){
580                    var tagName  = $elem.prop("tagName").toLowerCase(); 
581                    if(tagName == 'form'){
582                        $elem.submit();
583                    }
584                }
585                
586                UserActionObject = {};
587
588                if(another_tab_flg == true){
589                    $.getUa();
590                    another_tab_flg = false;
591                    sendFlg = false;
592                }
593
594            },
595            getPosition:function(e){
596                //analysis.jsよりまるっとコピー
597
598                //#4766 window 識別
599                if(!window.name){
600                    var rum = Math.ceil(Math.random() * 100);
601                    var now = Date.now() /1000;
602                    var win_name = Math.ceil(now * rum);
603                    window.name = win_name;
604                }
605
606                //#2297 シングルページ 対応
607                if ($sectionType.length) {
608                    $params  = $bg;
609                    siteType = ($params.data('device') == 'smart')? 'SP' : 'PC';
610                }
611
612                var offset = 0,
613                    x, y, pageID, data;
614
615                //#2297 シングルページ 対応
616                var sp_flg      = false;
617                var sp_full_flg = false;
618                var scroll      = 0;
619
620
621                if ($sectionType.length) {
622                    var centerW  = $sectionType.eq(0).width();
623                    var sectionh = $section.eq(0).height();
624                    var centerh  = $sectionType.eq(0).height();
625                    scroll       = $window.scrollTop();
626                    width        = $bg.width();
627                    sp_flg       = true;
628                    pos2_header  = 0;
629                    pos2_footer  = 0;
630                    pos2_other	 = 0;
631
632                    page_bottom =0;
633
634                    if ($bg.data('sp-type') == 1 && siteType == 'PC') {
635
636                        //フッター、固定バナー、固定メニューの場合は高さ微調整(固定のときキャプチャー位置は下に)
637                        var st_index = ($('section.section').filter('.active').length)? $('section.section').index($('section.section').filter('.active')) : 0;
638
639                        scroll = sectionh * st_index;
640                        
641                        //フッター、固定バナー、固定メニュー対応用
642                        page_bottom = sectionh * parseInt($('section.section').length);
643                        if($bg.find("#header").length && !$bg.find("#header.pos2").length){
644                            page_bottom += parseInt($bg.find("#header").height());
645                        }
646                        
647                    }else{
648                        //パララックス以外は、最後のセクションの位置から計算
649                        var lt_index = $('section.section').length - 1;
650                        var $_lt_sction = $('section.section').eq(lt_index);
651                        
652                        page_bottom = parseInt($_lt_sction.position().top) + parseInt($_lt_sction.height());
653
654                        if($bg.find("#header").length && !$bg.find("#header.pos2").length){
655                            page_bottom += parseInt($bg.find("#header").height());
656                        }
657                    }
658
659                    //matu ヘッダー固定時対応
660                    if($(e.target).closest("#header").length && !($bg.find("#header.pos2").length && !$bg.find("#header").hasClass("normal-header"))){
661                        //pos2_header = $bg.find("#header.pos2").height();
662                    }
663
664                    pageID = $bg.data('page-id');
665                } else {
666                    var centerW = $centerArea.width();
667                }
668
669                //111.5
670                if (siteType == 'PC') {
671                    offset = (width - centerW) / 2;
672                }
673
674                // クリック位置の座標(コンテンツ領域のみで算出)
675                if (sp_flg) {
676                    if (siteType == 'PC') {
677                        offset = (width >= centerW && !($(e.target).closest("#header").length || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length)) ? (width - centerW) / 2 : 0;
678                    }
679                    x = e.clientX - offset;
680                    y = e.clientY + scroll + pos2_header;
681
682
683                    //#2297 シングルページ 対応
684                    if ($bg.data('sp-type') == 1 && siteType == 'PC') {
685                        //パララックスタイプ
686                        //1020:573.75 = 16:9 (1020はキャプチャサイズ)
687                        y = (y - (((sectionh - centerh) / 2) * st_index)) + pos2_header;
688                        if($(e.target).closest("#header").length || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length){
689                            x = Math.round(x * (1020 / width));
690                        }else{
691                            x = Math.round(x * (1020 / centerW));
692                        }
693                        y = Math.round(y * (573.75 / sectionh));
694                    }else if(!$bg.data('sp-type') && siteType == 'PC'){
695                        //シングルページ
696                        //ヘッダー、フッター、固定バナーは可変でうごくので調整
697                        if(($(e.target).closest("#header").length &&!$(e.target).closest("#header").hasClass("normal-header")) || $(e.target).closest("#footer").length || $(e.target).closest("#fixedbanner").length){
698                            //現在ヒートマップキャプチャーの1100なので
699                            //x = Math.round(x * (1100 / centerW));
700                            x = Math.round(x * (1100 / width));
701                        }
702                    }
703                    
704                    if($(e.target).closest("#header").length && (($bg.find("#header.pos2").length && !$bg.find("#header").hasClass("normal-header")) || $bg.find("#header.a-logo-fixed").length && siteType != 'PC')){
705                        //y = e.clientY - parseInt($(e.target).closest("#header.pos2").position().top);
706                        y = e.clientY;
707                    }
708
709                    //フッター、固定バナー、固定メニューの場合は高さ微調整(固定のときキャプチャー位置は下に)
710                    if($(e.target).closest("#footer.pos2").length){
711                    // || $(e.target).closest("#fixedbanner.pos2").length) {
712                        pos2_footer = $(e.target).closest("#footer.pos2").height();
713                        y = page_bottom - pos2_footer + (e.clientY - parseInt($(e.target).closest("#footer.pos2").position().top));
714                    }
715
716                    if($(e.target).closest("#fixedbanner.pos2").length) {
717                        //フッターの下にくるので
718                        if($bg.find("#footer").length && !$bg.find("#footer").hasClass("pos2")){
719                            page_bottom += $bg.find("#footer").height();
720                        }
721                        y = page_bottom + (e.clientY - parseInt($(e.target).closest("#fixedbanner.pos2").position().top));
722
723                    }
724                    
725                } else {
726                    x = e.clientX - offset;
727                    y = e.clientY + $window.scrollTop();
728                }
729
730                return {'x':x,'y':y};
731
732            },
733            getScroll:function(){
734                //analysis.jsよりまるっとコピー
735
736                var scrolltimer      = false;
737                var visittimer       = false;
738                var scPageID         = pageId;
739                var sc_data          = {};
740                var scroll_y         = $window.scrollTop();
741                var scroll_x         = $window.scrollLeft();
742                
743                // 
744                visittimer = setInterval(function() {
745                    // 送信データ
746                    sc_data = {
747                        x			: scroll_x,
748                        y			: scroll_y,
749                        page_id		: scPageID,
750                        site_type	: siteType,
751                        url			: location.href,
752                        'window'	: width + ',' + height,
753                        'height'	: height,
754                        'width'		: width,
755                        'page_size'	: $bg.width() + ',' + $bg.height(),
756                    };
757
758                    // 終了時にタイマーを切る
759                    clearTimeout(visittimer);
760                }, 2);
761                
762                // スクロール
763                $(window).scroll(function() {
764                    if (visittimer !== false) {
765                        clearTimeout(visittimer);
766                    }
767                    if (scrolltimer !== false) {
768                        clearTimeout(scrolltimer);
769                    }
770                    
771                    scrolltimer = setTimeout(function() {
772                        scroll_y = $window.scrollTop();
773                        scroll_x = $window.scrollLeft();
774                        
775                        // 送信データ
776                        sc_data = {
777                            x			: scroll_x,
778                            y			: scroll_y,
779                            page_id		: scPageID,
780                            site_type	: siteType,
781                      //      url			: location.href,
782                            'window'	: width + ',' + height,
783                            'height'	: height,
784                            'width'		: width,
785                            'page_size'	: $bg.width() + ',' + $bg.height(),
786                        };
787
788                        $.insertUAObj('scroll',sc_data);
789                        
790                    }, 2000);
791                });
792
793            }
794            ,getResize:function(){
795
796                //analysis.jsよりまるっとコピー
797
798                var resizetimer      = false;
799                var visittimer       = false;
800                var scPageID         = pageId;
801                var re_data          = {};
802                var width            = $window.width();
803                var height           = $window.height();
804                
805                // 
806                visittimer = setInterval(function() {
807                    // 送信データ
808                    sc_data = {
809                        page_id		: scPageID,
810                        site_type	: siteType,
811                     //   url			: location.href,
812                        'window'	: width + ',' + height,
813                        'height'	: height,
814                        'width'		: width,
815                        'page_size'	: $bg.width() + ',' + $bg.height(),
816                    };
817
818                    // 終了時にタイマーを切る
819                    clearTimeout(visittimer);
820                }, 2);
821                
822                // スクロール
823                $(window).resize(function() {
824                    if (visittimer !== false) {
825                        clearTimeout(visittimer);
826                    }
827                    if (resizetimer !== false) {
828                        clearTimeout(resizetimer);
829                    }
830                    
831                    resizetimer = setTimeout(function() {
832                    var width            = $window.width();
833                    var height           = $window.height();
834                        // 送信データ
835                        re_data = {
836                            page_id		: scPageID,
837                            site_type	: siteType,
838                           // url			: location.href,
839                            'window'	: width + ',' + height,
840                            'height'	: height,
841                            'width'		: width,
842                            'page_size'	: $bg.width() + ',' + $bg.height(),
843                        };
844
845                        $.insertUAObj('resize',re_data);
846                        
847                    }, 2000);
848                });
849            },getYTplayer:function(status,id){
850
851                var $_this = $('#'+id);
852                var src    = $_this.attr('src');
853
854                if($_this.length){
855                    if(status == 1){
856            
857                        var id1   = $_this.parents('.block').data('block-id');
858                        var id2   = $_this.parents('.record').data('record-id');
859            
860                        var attrs = $_this.get(0).attributes;
861                        var attrsStr = '<iframe '; 
862            
863                        for (var i = 0; i < attrs.length; i++) {
864                            attrsStr += attrs[i]['name'];
865                            if(attrs[i]['value'] != ''){
866                                attrsStr += "='" + attrs[i]['value'] + "'";
867                            }
868                            attrsStr += " ";
869                        }
870            
871                        attrsStr += '>';
872
873                        if(src.match(/autoplay\=0/) || YTPlayFlg){
874                            var data = {
875                                'event'   :'play',
876                                'page_id' :pageId,
877                                'id1'     :id1,
878                                'id2'     :id2,
879                                'element' :attrsStr,
880                            };
881                            $.insertUAObj('youtube',data);
882                        }
883                        YTPlayFlg = true;
884                    }else if(status == 3){
885                        YTAutoPauseFlg = true;
886                    }else if(status == 2){
887            
888                        var id1   = $_this.parents('.block').data('block-id');
889                        var id2   = $_this.parents('.record').data('record-id');
890            
891                        var attrs = $_this.get(0).attributes;
892                        var attrsStr = '<iframe '; 
893            
894                        for (var i = 0; i < attrs.length; i++) {
895                            attrsStr += attrs[i]['name'];
896                            if(attrs[i]['value'] != ''){
897                                attrsStr += "='" + attrs[i]['value'] + "'";
898                            }
899                            attrsStr += " ";
900                        }
901            
902                        attrsStr += '>';
903            
904                        setTimeout(function(){
905                            if(!YTAutoPauseFlg){
906                                var data = {
907                                    'event'   :'pause',
908                                    'page_id' :pageId,
909                                    'id1'     :id1,
910                                    'id2'     :id2,
911                                    'element' :attrsStr,
912                                };
913            
914                                $.insertUAObj('youtube',data);
915                            }
916                            YTAutoPauseFlg = false;
917                        }, 100);
918                    }
919
920                }
921            },getUa:function(){
922
923                created = $.getDate();
924
925                var data = {
926                    ua:ua,
927                    window:winSize,
928                    x:scroll_x,
929                    y:scroll_y,
930                    close_user_name:closeUserName,
931                    close_user_id:closeUserId,
932                    unique_page_id:uniquePageId
933                };
934
935                $.insertUAObj('user_agent',data);
936
937                $.getScroll();
938                $.getResize();
939
940                $.firstEventAdd();
941
942            }
943        });
944
945        $(document).ready(function(){
946
947            //get_uuid.tplに移植
948            // if($cookie == undefined){
949            //     $.ajax({
950            //         type: 'GET',
951            //         url : 'https://9e2xkh9f1e.execute-api.ap-northeast-1.amazonaws.com/v1/getUniqueUserId',
952            //         crossDomain:true,
953            //         xhrFields: {
954            //             withCredentials: true
955            //         },
956            //         success: function(data) {
957            //             var uuid = JSON.stringify(data['body']['uuid']);
958            //             var rep_uuid = uuid.replace(/\"/g,'');
959
960            //             $.cookie("__ds_uuid",rep_uuid,{
961            //                 expires:730,
962            //                 //path: '/',
963            //                 path : BaseUrl
964            //             });
965
966            //             $cookie = $.cookie('__ds_uuid');
967            //             public_uuid = $cookie;
968            //         },
969            //         error:function(data){
970            //             //console.log('er');
971            //             //console.log(data);
972            //         }
973            //     });
974            // }
975
976            $.getUa();
977        });
978
979
980	});
981}($jq);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.