LoginSignup
0
0

More than 5 years have passed since last update.

Zopimに自社DBで持ってる情報を渡してみた

Last updated at Posted at 2016-08-29

RailsでSlim使ってます。

zopim.slim
- if user_signed_in?
  javascript:
    $zopim(function(){
      $zopim.livechat.setName("#{current_user.name}");
      $zopim.livechat.setEmail("#{current_user.email}");
    });
- else
  javascript:
    $zopim(function(){});

$zopim.livechatでzopimの窓にパラメータを渡せる。
setNameで名前
setEmailでメールアドレス
setPhoneで電話番号
など。

setでパラメータを渡す方法もあり。

  $zopim(function(){
    $zopim.livechat.set({
      name: "#{current_user.name}",
      email: "#{current_user.email}"
    });
  });
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0