본문 바로가기
반응형

 

 

 

 

채널톡 API 연동 가이드

 

https://channel.io/ko/guides/articles/1bfa136b-%EC%B1%84%EB%84%90%ED%86%A1-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0

 

채널톡 사용 가이드

설치부터 마케팅까지, 채널톡 사용을 위한 고객 가이드입니다.

channel.io

 

 

 

### HEADER

	<!-- AceCounter Mobile WebSite Gathering Script V.8.0.2019080601 -->
	<script language='javascript'>
	    var _AceGID=(function(){var Inf=['www.wivismall.com','www.wivismall.com','AX2A100312','AM','0','NaPm,Ncisy','ALL','0']; var _CI=(!_AceGID)?[]:_AceGID.val;var _N=0;if(_CI.join('.').indexOf(Inf[3])<0){ _CI.push(Inf);  _N=_CI.length; } return {o: _N,val:_CI}; })();
	    var _AceCounter=(function(){var G=_AceGID;var _sc=document.createElement('script');var _sm=document.getElementsByTagName('script')[0];if(G.o!=0){var _A=G.val[G.o-1];var _G=(_A[0]).substr(0,_A[0].indexOf('.'));var _C=(_A[7]!='0')?(_A[2]):_A[3];var _U=(_A[5]).replace(/\,/g,'_');_sc.src='https:'+'//cr.acecounter.com/Mobile/AceCounter_'+_C+'.js?gc='+_A[2]+'&py='+_A[1]+'&up='+_U+'&rd='+(new Date().getTime());_sm.parentNode.insertBefore(_sc,_sm);return _sc.src;}})();
	</script>
	<!-- AceCounter Mobile Gathering Script End -->

 

 

### BODY

<button onclick="javascript:chatBot();">채팅</button>

 

 

### SCRIPT

(function(){var w=window;if(w.ChannelIO){return w.console.error("ChannelIO script included twice.");}var ch=function(){ch.c(arguments);};ch.q=[];ch.c=function(args){ch.q.push(args);};w.ChannelIO=ch;function l(){if(w.ChannelIOInitialized){return;}w.ChannelIOInitialized=true;var s=document.createElement("script");s.type="text/javascript";s.async=true;s.src="https://cdn.channel.io/plugin/ch-plugin-web.js";var x=document.getElementsByTagName("script")[0];if(x.parentNode){x.parentNode.insertBefore(s,x);}}if(document.readyState==="complete"){l();}else{w.addEventListener("DOMContentLoaded",l);w.addEventListener("load",l);}})();
// 2024.05.09 - 채널톡 고객정보 처리
if(getcustId == null || getcustId == "" || getcustId == undefined || getcustId == "undefined"){
    ChannelIO('boot', {
          "pluginKey": "pluginKey pluginKey pluginKey pluginKey",
          "customLauncherSelector": "#bottom-btns .btn-chat",
          "hideChannelButtonOnBoot": true
        });
}
else{
    ChannelIO('boot', {
          "pluginKey": "pluginKey pluginKey pluginKey pluginKey",
          "customLauncherSelector": "#bottom-btns .btn-chat",
          "hideChannelButtonOnBoot": true,
          "memberId": getCustInfo.custNo, // fill user's member id
          "profile": { // fill user's profile
                "name": getcustNm, // fill user's name
                "mobileNumber": getCustInfo.cellPhnno, // fill user's mobile number
                "email": getCustInfo.email,  // fill user's email
                "CUSTOM_VALUE_1": "VALUE_1", // custom property
                "CUSTOM_VALUE_2": "VALUE_2" // custom property
                }
        });
}

 

 

 

 

 

 

 

 

반응형