미디어위키:Common.js: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
353번째 줄: 353번째 줄:
gtag('js', new Date());
gtag('js', new Date());
    // 🔹 자동 page_view 끄기
// 🔹 자동 page_view 끄기
    gtag('config', GA_ID, {
gtag('config', GA_ID, {
        send_page_view: false
send_page_view: false
    });
});
// 언어를 사용자 속성으로 항상 전송(보고서에서 맞춤차원으로 필터)
// 언어를 사용자 속성으로 항상 전송(보고서에서 맞춤차원으로 필터)
gtag('set', 'user_properties', { site_language: lang });
gtag('set', 'user_properties', { site_language: lang });
     // page_path + content_group 같이 전송
     // page_path + content_group 같이 전송
    gtag('event', 'page_view', {
gtag('event', 'page_view', {
        page_path: location.pathname + location.search,
    page_location: location.href,
        content_group: lang
    page_path: location.pathname + location.search,
    });
    page_title: document.title,
    content_group: lang
});
     console.log('gtag', lang);
     console.log('gtag', lang);
    console.log('title', document.title)
})();
})();