PageSourceSearch

https://www.iipamaster.jp/js/ga4Custom.js?20260917110335

js iipamaster.jp collected 2026-09-24 11:03:24 UTC 12,511 bytes, 359 lines download raw bytes

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.