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 1
1
/*!
2
2
* tui-code-snippet.js
3
- * @version 1.3 .0
3
+ * @version 1.4 .0
4
4
* @author NHNEnt FE Development Lab <[email protected] >
5
5
* @license MIT
6
6
*/
@@ -1677,6 +1677,38 @@ return /******/ (function(modules) { // webpackBootstrap
1677
1677
1678
1678
var object = __webpack_require__ ( 1 ) ;
1679
1679
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
+ }
1680
1712
1681
1713
/**
1682
1714
* Request image ping.
@@ -1717,7 +1749,8 @@ return /******/ (function(modules) { // webpackBootstrap
1717
1749
}
1718
1750
1719
1751
module . exports = {
1720
- imagePing : imagePing
1752
+ imagePing : imagePing ,
1753
+ sendHostname : sendHostname
1721
1754
} ;
1722
1755
1723
1756
You can’t perform that action at this time.
0 commit comments