Browse Source

마케팅스크립트 추가

gagamel 5 years ago
parent
commit
6450ad0c0b

+ 51 - 0
src/main/webapp/WEB-INF/views/web/common/fragments/MktScriptsWeb.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : MktScriptsWeb.html
+ * @desc    : 마케팅 스크립트
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.03.18   gagamel     최초 작성
+ *******************************************************************************
+ -->
+<th:block th:fragment="mscripts">
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	String.prototype.hashCode = function() {
+		var hash = 0;
+		for (var i = 0; i < this.length; i++) {
+			var character = this.charCodeAt(i);
+			hash = ((hash<<5) - hash) + character;
+			hash = hash & hash; // Convert to 32bit integer
+		}
+		return hash;
+	}
+	
+	var gCustId = gagajf.isNull([[${sessionInfo.custId}]]) ? '' : [[${sessionInfo.custId}]];
+	var hCustId = gCustId ? gCustId.hashCode() : '';
+	console.log('hCustId: ' + hCustId);
+	
+	/* Eiengine Script */
+	window._eglqueue = window._eglqueue || [];
+	_eglqueue.push(['setVar', 'cuid', '1252aed4-78dc-46e8-b784-94ac42e86dd4']);
+	_eglqueue.push(['setVar', 'userId', hCustId]);
+	_eglqueue.push(['track', 'visit']);
+	(function (s, x) {
+		s = document.createElement('script'); s.type = 'text/javascript';
+		s.async = true; s.defer = true; s.src = (('https:' == document.location.protocol) ? 'https' : 'http') + '://logger.eigene.io/js/logger.min.js';
+		x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
+	})();
+	/* \\Eiengine Script */
+/*]]>*/
+</script>
+
+</th:block>
+
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/views/web/common/layout/BrandLayoutWeb.html

@@ -27,7 +27,7 @@
 <footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
 
 <th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
-<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
+<th:block th:replace="~{web/common/fragments/MktScriptsWeb :: mscripts}"></th:block>
 
 <script th:inline="javascript">
 /*<![CDATA[*/

+ 1 - 1
src/main/webapp/WEB-INF/views/web/common/layout/CallcenterLayoutWeb.html

@@ -27,7 +27,7 @@
 <footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
 
 <th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
-<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
+<th:block th:replace="~{web/common/fragments/MktScriptsWeb :: mscripts}"></th:block>
 
 <script th:inline="javascript">
 /*<![CDATA[*/

+ 1 - 1
src/main/webapp/WEB-INF/views/web/common/layout/DefaultLayoutWeb.html

@@ -27,7 +27,7 @@
 <footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
 
 <th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
-<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
+<th:block th:replace="~{web/common/fragments/MktScriptsWeb :: mscripts}"></th:block>
 
 <script th:inline="javascript">
 /*<![CDATA[*/

+ 1 - 2
src/main/webapp/WEB-INF/views/web/common/layout/MypageLayoutWeb.html

@@ -63,9 +63,8 @@
 <footer id="footer" th:replace="~{web/common/fragments/FooterWeb :: footer}"></footer>
 
 <th:block th:replace="~{web/common/fragments/ScriptsWeb :: scripts}"></th:block>
-<!-- <th:block th:replace="~{web/common/fragments/MarketingScripts :: mscripts}"></th:block> -->
-
 <script th:src="@{'/ux/pc/js/mypage.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/pc/js/mypage.js"></script>
+<th:block th:replace="~{web/common/fragments/MktScriptsWeb :: mscripts}"></th:block>
 
 <script th:inline="javascript">
 /*<![CDATA[*/