Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Latest commit

 

History

History
75 lines (60 loc) · 1.38 KB

README.md

File metadata and controls

75 lines (60 loc) · 1.38 KB

Zyg

Zyg is purpose-built customer support for your SaaS products.
Website · X · Issues

⚠️ Deprecated

This project is deprecated and no longer maintained. Please use zyg-js for the updated version or alternative.

Usage

Enable Chat Widget

<script>
  ZygSDK("init", {
    widgetId: "wg_cqdq05ctidu9511bvag0",
  });
</script>

Enable Chat Widget with Customer Identity Verification

<script>
  ZygSDK("init", {
    widgetId: "wg_cqdq05ctidu9511bvag0",
    customerEmail: "[email protected]",
    customerHash: "lkahsodhflaskjdhfkahsdf-asndfkbn"
    traits: {
      name: "Jonny Depp",
    },
  });
</script>

Example Usage in a React Component

view example

import { useEffect } from "react";

declare global {
  interface Window {
    ZygSDK: any;
  }
}

function App() {
  useEffect(() => {
    window.ZygSDK("init", {
      widgetId: "wg_cqdq05ctidu9511bvag0",
      traits: {
        name: "Jonny Depp",
      },
    });
  }, []);

....