File tree Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 11/*!
22 * tui-code-snippet.js
3- * @version 1.3 .0
3+ * @version 1.4 .0
44 * @author NHNEnt FE Development Lab <dl_javascript@nhnent.com>
55 * @license MIT
66 */
@@ -1677,6 +1677,38 @@ return /******/ (function(modules) { // webpackBootstrap
16771677
16781678 var object = __webpack_require__ ( 1 ) ;
16791679 var collection = __webpack_require__ ( 4 ) ;
1680+ var type = __webpack_require__ ( 2 ) ;
1681+
1682+ /**
1683+ * Send hostname on DOMContentLoaded.
1684+ * To prevent hostname set tui.usageStatistics to false.
1685+ * @param {string } applicationId - application id to send
1686+ * @ignore
1687+ */
1688+ function sendHostname ( applicationId ) {
1689+ var url = 'https://www.google-analytics.com/collect' ;
1690+ var hostname = location . hostname ;
1691+ var hitType = 'event' ;
1692+ var trackingId = 'UA-115377265-9' ;
1693+
1694+ // skip only if the flag is defined and is set to false explicitly
1695+ if ( ! type . isUndefined ( window . tui ) && window . tui . usageStatistics === false ) {
1696+ return ;
1697+ }
1698+
1699+ setTimeout ( function ( ) {
1700+ if ( document . readyState === 'interactive' || document . readyState === 'complete' ) {
1701+ imagePing ( url , {
1702+ v : 1 ,
1703+ t : hitType ,
1704+ tid : trackingId ,
1705+ cid : hostname ,
1706+ dp : hostname ,
1707+ dh : applicationId
1708+ } ) ;
1709+ }
1710+ } , 1000 ) ;
1711+ }
16801712
16811713 /**
16821714 * Request image ping.
@@ -1717,7 +1749,8 @@ return /******/ (function(modules) { // webpackBootstrap
17171749 }
17181750
17191751 module . exports = {
1720- imagePing : imagePing
1752+ imagePing : imagePing ,
1753+ sendHostname : sendHostname
17211754 } ;
17221755
17231756
You can’t perform that action at this time.
0 commit comments