Zoho Commerceサイトビルダー
Identifier APIをZoho Commerceサイトビルダーに追加する場合は、以下の手順に従います。
1. Identifier APIを挿入するストアを開きます。[サイト設定]に移動します。
2. [一般]で、[ヘッダーとフッターのコード]を選択し、以下のコードを追加します。
- <script>
- function getuserDetail(){
- $X.get({
- url: '/portaluser/getCurrentPortalUser',
- handler: function () {
- var response = JSON.parse(this.responseText);
- if(response.status_message === 'success'){
- if(response.current_user.user!== 'null'){
- let userEmail = response.current_user.emailid;
- window.pagesense = window.pagesense || [];
- window.pagesense.push(['identifyUser',userEmail ]);
- }
- }
- }
- })
- }
- window.addEventListener('load', getuserDetail);
- </script>
|
3. [保存]をクリックし、サイトを[公開]します。
Zoho Sitesビルダー
Identifier APIをZoho Sitesビルダーに追加する場合は、以下の手順に従います。
1. Zoho Sitesアカウントにログインします。
2. [Webサイト]→[サイト設定]を開きます。
3. [一般]で、コードを挿入するために[ヘッダーとフッターのコード]をクリックします。
4. 以下のIdentifier APIコードをヘッダー領域に貼り付けます。
- <script>
- function getuserDetail(){
- $X.get({
- url: '/portaluser/getCurrentPortalUser',
- handler: function () {
- var response = JSON.parse(this.responseText);
- if(response.status_message === 'success'){
- if(response.current_user.user!== 'null'){
- let userEmail = response.current_user.emailid;
- window.pagesense = window.pagesense || [];
- window.pagesense.push(['identifyUser',userEmail ]);
- }
- }
- }
- })
- }
- window.addEventListener('load', getuserDetail);
- </script>
|
5. [保存]と[公開]をクリックします。
Zoho SalesIQ
Identifier APIをZoho SalesIQに追加する場合は、以下の手順に従います。
以下のJavaScript Identifier APIコードを、WebサイトのJSコード内にコピーして貼り付けます。
- $zoho.salesiq.ready=function()
- {
- $zoho.salesiq.visitor.chat(function(visitid,data)
- {
- window.pagesense = window.pagesense || [];
- window.pagesense.push(['identifyUser', data.メール]);
- });
- }
- $zoho.salesiq.visitor.offlineMessage(function(visitid,data)
- {
- window.pagesense = window.pagesense || [];
- window.pagesense.push(['identifyUser', data.メール]);
- });