Auto-login

You can auto-login your users and pass company & user data to Convas for advanced segmentation using our javascript SDK.

Auto-login

If you activate our auto-login feature, your users will be automatically authenticated on Convas and linked to their existing account in your application. They will not have to log in or create an account to share feedback with you. 🚀

This feature is in Early Preview, which means that it is ready to use but may still have a few rough edges.

To install the auto-login on your web app simply copy and paste the snippet below before the </body> tag on every page where you want the Convas to identify users to appear for your customers. We will throttle requests for the auto-login call to 3 calls per minute.

Change the customDomain to the custom domain you have configured for your Convas page and pass relevant user data.

<script>
  (function (w, d, s, o, f, js, fjs) {
    w[o] =
      w[o] ||
      function () {
        (w[o].q = w[o].q || []).push(arguments);
      };
    (js = d.createElement(s)), (fjs = d.getElementsByTagName(s)[0]);
    js.id = o;
    js.src = f;
    js.async = 1;
    fjs.parentNode.insertBefore(js, fjs);
  })(
    window,
    document,
    "script",
    "_convas_sdk",
    "https://convas.io/static/convas-sdk.js"
  );
  window._convas_sdk("init", {
    debug: false,
    customDomain: "feedback.example.com",
    widget: {
      enabled: true,
      showLauncher: true,
    },
  });
  window._convas_sdk("identify", {
    enabled: true,
    user: {
      id: "user-id",
      name: "John Doe",
      email: "john.doe@example.com",
      customFields: { role: "Project Manager" }, // Optional
      createdAt: new Date(), // Optional
    },
    // Optional
    company: {
      id: "company-id",
      name: "Example Company",
      customFields: { employees: 100 }, // Optional
      createdAt: new Date(), // Optional
      monthlySpend: 600, // Optional
    },
  });
</script>

Limitations

  • It is not possible to authenticate Company Users with the SDK.
  • Authenticated users will only be able to make new posts and comments. They will not be able to edit their profile, remove posts or comments without manually authenticating.
  • Custom domain is required.