1 2// ì¬ì©ì 기본ì ë³´ : 모ë íì´ì§ 3function MyCustomInfo() { 4 gtag('event', 'MyCustomInfo', { 5 isMember: GoogleGtagVar_Mem, // ë¡ê·¸ì¸ì¬ë¶ 6 member_key : GoogleGtagVar_MemKey, // íìí¤ 7 member_job : GoogleGtagVar_MemJob, // ì§ì 8 member_type : GoogleGtagVar_MemTyp, // íìíì 9 inflow_path : GoogleGtagVar_MemPath, // ì ì ê²½ë¡ 10 subscription_path : GoogleGtagVar_MemMthd, // ê°ì ê²½ë¡ 11 content_url : GoogleGtagVar_CurPath // íì¬ íì´ì§url 12 }); 13} 14 15// ì¡ì ì´ë²¤í¸ ë°ì (ì¤í¬ë¡¤ì ì¸): 모ë íì´ì§ 16function ActionHistory(action, area) { 17 gtag('event', 'ActionHistory', { 18 category: 'ActionHistory', // ì´ë²¤í¸ëª 19 action: action, // í´ë¦/ í¸ë² 20 // content_category : GoogleGtagVar_Page, // íì´ì§ ëë¶ë¥ 21 content_name: area, // íì´ì§ëª ìì¼ë©´ ë²í¼ëª 22 }); 23} 24 25// ì¿ í°ë°ê¸° í´ë¦ : ì¿ í°ë°ê¸° ë²í¼ 26function CouponClick(cpn_nm,cpn_mas) { 27 if (typeof(FaceBookPixelVar_Page) != 'undefined' ) { 28 gtag('event', 'CouponClick', { 29 coupon_code:cpn_mas, // ì¿ í°MAS 30 discount_cost:'0', // ì¿ í°ê¸ì¡ 31 discoun_trate:'0%', // í ì¸ì¨ 32 content_url : GoogleGtagVar_CurPath, // íì¬ íì´ì§url 33 member_key : GoogleGtagVar_MemKey, // íìí¤ 34 member_job : GoogleGtagVar_MemJob, // ì§ì 35 member_type : GoogleGtagVar_MemTyp // íìíì 36 }) 37 } 38} 39 40// ì¶ê°ìì íì 41// ì¥ë°êµ¬ë ë²í¼í´ë¦ : ì¥ë°êµ¬ë ë´ê¸° ë²í¼ ì ì²´ 42function AddToCartClick() { 43 if (typeof(FaceBookPixelVar_Page) != 'undefined' ) { 44 gtag('event', 'AddToCartClick', { 45 content_category:GoogleGtagVar_PageCate, // ìíì¢ ë¥ 46 content_name:GoogleGtagVar_Prod, // í매ìíëª 47 content_ids:GoogleGtagVar_Ids, // í매ì½ë 48 currency : 'JPY', // íµíì¢ ë¥ 49 value : GoogleGtagVar_Val, // í매ê¸ì¡ 50 member_key : GoogleGtagVar_MemKey, // íìí¤ 51 member_job : GoogleGtagVar_MemJob, // ì§ì 52 member_type : GoogleGtagVar_MemTyp // íìíì 53 }) 54 } 55} 56 57 58// í´ëì¤, í¨ì¤, ì§ëì, íë¡ëª¨ì , êµì¬ íì´ì§ ì ê·¼ì : íì´ì§ ëë©í ì¤í 59function ViewContent() { 60 61 62 // content_category 63 // content_name 64 // content_ids 65 // currency 66 // value 67 // site_category 68 // target_market 69 70 71 72} 73 74/** 75 * ì´íë§ì¤í° 커뮤ëí° GA 76 */ 77window.$communityGA = new (function sendEventGAForCommunity() { 78 this.isDebug = true; // ëë²ê¹ ì 무 79 this.isSet = false; 80 this.commonParams = { 81 isMember : 'N', // ë¡ê·¸ì¸ì¬ë¶ 82 member_key : '', // íìí¤ 83 member_job : '', // ì§ì 84 member_type: '', // íìíì 85 platform : 'WEB' // WEB, APP 86 }; 87 88 /** 89 * ê³µì© íë¼ë©í° ì¤ì íì§ ììì ë 기본 ê° ì¸í 90 */ 91 this.initCommonParams = function() { 92 if(!this.isSet) { 93 this.commonParams.isMember = (typeof GoogleGtagVar_Mem != 'undefined') ? GoogleGtagVar_Mem:'N'; // ë¡ê·¸ì¸ì¬ë¶ 94 this.commonParams.member_key = (typeof GoogleGtagVar_MemKey != 'undefined') ? GoogleGtagVar_MemKey:null; // íìí¤ 95 this.commonParams.member_job = (typeof GoogleGtagVar_MemJob != 'undefined') ? GoogleGtagVar_MemJob:null; // ì§ì 96 this.commonParams.member_type = (typeof GoogleGtagVar_MemTyp != 'undefined') ? GoogleGtagVar_MemTyp:null; // íìíì 97 } 98 }; 99 100 /** 101 * ê³µì© íë¼ë©í° ì¤ì 102 * @param {*} params 103 */ 104 this.setCommonParams = function(params) { 105 params = params || {}; 106 for(let key in params) { 107 this.commonParams[key] = params[key]; 108 } 109 this.isSet = true; 110 } 111 112 /** 113 * ì´ë²¤í¸ í¸ì¶ ë´ë¶ í¨ì 114 * @param {*} event_name 115 * @param {*} params 116 */ 117 this.__sendEvent = function(event_name, params) { 118 if(typeof gtag == 'function') { 119 try { 120 gtag('event', event_name, Object.assign({}, params)); 121 } catch(e) { 122 console.error(e); 123 } 124 } 125 }; 126 127 /** 128 * ì´ë²¤í¸ í¸ì¶ 129 * @param {*} event_name 130 * @param {*} params 131 */ 132 this.sendEvent = function(event_name, params) { 133 if(this.isDebug) { 134 // í ì¤í¸ìë²ë ì½ìì ë ¸ì¶ë§ 135 if(/^t\-/.test(location.hostname)) { 136 console.info('gtag event', event_name, Object.assign({}, params)); 137 } else { 138 if(typeof gtag == 'function') { 139 this.__sendEvent(event_name, params); 140 } else { 141 console.info('not install GA, gtag event', event_name, Object.assign({}, params)); 142 } 143 } 144 } else { 145 this.__sendEvent(event_name, params); 146 } 147 }; 148 149 /** 150 * 커뮤ëí° ë©ë´ í´ë¦ 151 */ 152 this.sendEventClickCommunityMenu = function() { 153 this.initCommonParams(); 154 this.sendEvent('Community_click', { 155 isMember : this.commonParams.isMember, 156 member_job : this.commonParams.member_job, 157 member_type: this.commonParams.member_type, 158 platform : this.commonParams.platform, 159 }); 160 }; 161 162 /** 163 * ê²ì물 í´ë¦ 164 * (UIìì ê²ì물 í´ë¦ì, íì´ì§ ë¤ì´ë í¸ ì ìì X) 165 */ 166 this.sendEventClickPost = function(params) { 167 params = params || {}; 168 this.initCommonParams(); 169 if(!params.communty_category) { 170 console.error('communty_categoryë íì ì ëë¤.'); 171 return false;
172 } 173 this.sendEvent('Feed_click', { 174 isMember : this.commonParams.isMember, 175 member_job : this.commonParams.member_job, 176 member_type : this.commonParams.member_type, 177 platform : this.commonParams.platform, 178 communty_category: params.communty_category 179 }); 180 }; 181 182 /** 183 * ê²ì물 ì¶ì² 184 * (íìì´ ê²ì물ì ì¶ì²íì ë, ì·¨ìë X) 185 */ 186 this.sendEventLikePost = function(params) { 187 params = params || {}; 188 this.initCommonParams(); 189 if(this.commonParams.isMember == 'Y') { 190 if(!params.communty_category) { 191 console.error('communty_categoryë íì ì ëë¤.'); 192 return false; 193 } 194 this.sendEvent('Feed_Like_click', { 195 member_job : this.commonParams.member_job, 196 member_type : this.commonParams.member_type, 197 platform : this.commonParams.platform, 198 communty_category: params.communty_category 199 }); 200 } 201 }; 202 203 /** 204 * ê²ì물 ê¸ì°ê¸° ë²í¼ ëë ë©ì¸ì ê¸ì°ê¸° ë°ì¤ í´ë¦ì 205 */ 206 this.sendEventClickWritePostBtn = function(params) { 207 params = params || {}; 208 this.initCommonParams(); 209 if(this.commonParams.isMember == 'Y') { 210 this.sendEvent('Write_click', { 211 member_job : this.commonParams.member_job, 212 member_type: this.commonParams.member_type, 213 platform : this.commonParams.platform 214 }); 215 } 216 }; 217 218 /** 219 * ê²ì물 ë±ë¡ 220 * (íìì´ ê²ì물ì ë±ë¡íì ë) 221 */ 222 this.sendEventCreatePost = function(params) { 223 params = params || {}; 224 this.initCommonParams(); 225 if(this.commonParams.isMember == 'Y') { 226 if(!params.communty_category) { 227 console.error('communty_categoryë íì ì ëë¤.'); 228 return false; 229 } 230 this.sendEvent('Write_submit_click', { 231 member_job : this.commonParams.member_job, 232 member_type : this.commonParams.member_type, 233 platform : this.commonParams.platform, 234 communty_category: params.communty_category 235 }); 236 } 237 }; 238 239 /** 240 * ëê¸ ì ë ¥ì°½ í´ë¦ ëë íì±íì 241 */ 242 this.sendEventFocusWriteCommentBox = function(params) { 243 params = params || {}; 244 this.initCommonParams(); 245 if(this.commonParams.isMember == 'Y') { 246 if(!params.communty_category) { 247 console.error('communty_categoryë íì ì ëë¤.'); 248 return false; 249 } 250 this.sendEvent('Comment_click', { 251 member_job : this.commonParams.member_job, 252 member_type : this.commonParams.member_type, 253 platform : this.commonParams.platform, 254 communty_category: params.communty_category 255 }); 256 } 257 }; 258 259 /** 260 * ëê¸ ì¶ì² 261 * (íìì´ ëê¸ì ì¶ì²íì ë, ì·¨ìë X) 262 */ 263 this.sendEventLikeComment = function(params) { 264 params = params || {}; 265 this.initCommonParams(); 266 if(this.commonParams.isMember == 'Y') { 267 this.sendEvent('Comment_Like_click', { 268 member_job : this.commonParams.member_job, 269 member_type: this.commonParams.member_type, 270 platform : this.commonParams.platform 271 }); 272 } 273 }; 274 275 /** 276 * ëê¸ ë±ë¡ 277 * (íìì´ ëê¸ì ë±ë¡íì ë) 278 */ 279 this.sendEventCreateComment = function(params) { 280 params = params || {}; 281 this.initCommonParams(); 282 if(this.commonParams.isMember == 'Y') { 283 this.sendEvent('Comment_submit_click', { 284 member_job : this.commonParams.member_job, 285 member_type: this.commonParams.member_type, 286 platform : this.commonParams.platform 287 }); 288 } 289 }; 290 291 /** 292 * ê²ì물 ê³µì í기 293 * (íìì´ ê³µì í기 기ë¥ì ì¤ííì ë) 294 * @param params.communty_category ì´ì¼ê¸°ëë, ê³ ë¯¼ìì´ì, í°ì¹ë ¸íì°, ì 문ê°ì¹¼ë¼ ë± ì¹´í ê³ ë¦¬ ì´ë¦ 295 */ 296 this.sendEventSharePost = function(params) { 297 params = params || {}; 298 this.initCommonParams(); 299 if(!params.communty_category) { 300 console.error('communty_categoryë íì ì ëë¤.'); 301 return false;
302 } 303 this.sendEvent('share_click', { 304 isMember : this.commonParams.isMember, 305 member_job : this.commonParams.member_job, 306 member_type : this.commonParams.member_type, 307 platform : this.commonParams.platform, 308 communty_category: params.communty_category 309 }); 310 }; 311 312 /** 313 * íìê°ì ë²í¼ í´ë¦ì 314 * (ë¹ë¡ê·¸ì¸ì ë¡ê·¸ì¸ ìë¹ì¤ ì´ì©íë©´ ë¨ë confirm ì°½ìì íìê°ì ë²í¼ í´ë¦ì) 315 * @param params.community_path ê¸ì°ê¸°, ëê¸, ì¶ì², ë¶ë§í¬, íë¡ì° 316 */ 317 this.sendEventClickJoinMemberBtn = function(params) { 318 params = params || {}; 319 this.initCommonParams(); 320 this.sendEvent('CommunityPop_Join_click', { 321 platform: this.commonParams.platform, 322 }); 323 }; 324 325 /** 326 * íì´ì§ ì´ëì 327 * @param params.content_url URL 328 */ 329 this.sendEventViewPage = function(params) { 330 params = params || {}; 331 this.initCommonParams(); 332 if(!params.content_url) { 333 console.error('content_urlë íì ì ëë¤.'); 334 return false; 335 } 336 this.sendEvent('ViewCommunity', { 337 isMember : this.commonParams.isMember, 338 member_job : this.commonParams.member_job, 339 member_type: this.commonParams.member_type, 340 content_url: params.content_url, 341 }); 342 }; 343 344 /** 345 * ë¡ê·¸ì¸ ìì² íì¸ì°½ ë ¸ì¶ì 346 * @param params.community_path ê¸ì°ê¸°, ëê¸, ì¶ì²(ê²ì물/ëê¸ ë ë¤ ê°ì), ë¶ë§í¬, íë¡ì°, í¬í, 기í(기í ë¡ê·¸ì¸ íìí ë©ë´ ê°ì ê² ì§ì ì) 347 */ 348 this.sendEventShowLoginConfirm = function(params) { 349 params = params || {}; 350 this.initCommonParams(); 351 if(!params.community_path) { 352 console.error('community_pathë íì ì ëë¤.'); 353 return false; 354 } 355 this.sendEvent('CommunityPop', { 356 community_path: params.community_path 357 }); 358 }; 359})();
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.