Skip to content

Instantly share code, notes, and snippets.

@blaswan
Last active May 22, 2017 09:37
Show Gist options
  • Save blaswan/409e6dd074939f10eb6ffe06ea163c4f to your computer and use it in GitHub Desktop.
Save blaswan/409e6dd074939f10eb6ffe06ea163c4f to your computer and use it in GitHub Desktop.
<!-- Channel Plugin Scripts -->
<script>
window.channelPluginSettings = {
"plugin_id": "YOUR_PLUGIN_ID"
};
<!--{? userInfo.member_seq }-->
window.channelPluginSettings.user = {
'id': '{userid}',
'name': '{user_name}',
'mobileNumber': '{cellphone}',
'meta': {
'회원등급': '{group_name}',
'닉네임': '{nickname}',
'이메일': '{email}',
'진행중인 주문': '{summary.order_ing_cnt}개',
'교환 / 반품': '{summary.return_ing_cnt}개',
'장바구니': '{summary.cart_cnt}개',
'위시리스트': '{summary.wish_cnt}개'
}
};
<!--{ : }-->
<!--{ / }-->
(function() {
var node = document.createElement('div');
node.id = 'ch-plugin';
document.body.appendChild(node);
var async_load = function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//cdn.channel.io/plugin/ch-plugin-web.js';
s.charset = 'UTF-8';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
};
if (window.attachEvent) {
window.attachEvent('onload', async_load);
} else {
window.addEventListener('load', async_load, false);
}
})();
</script>
<!-- End Channel Plugin -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment