@xoal/client
v1.0.5
Published
Xoal client SDK for React, NextJS, and Javascript.
Downloads
17
Maintainers
Readme
This is a javascript client SDK for Xoal. Be sure to sign up on Xoal to get your implementation key.
Add snippet to your page header.
Be sure to replace WIDGET_KEY
with your actual widget key.
<script src="https://cdn.jsdelivr.net/npm/@xoal/client/build/index.js"></script>
<script>
(async function(){
let Xoal = window.Xoal.default;
Xoal.auth("WIDGET_KEY")
})()
</script>
Add using NPM
npm i @xoal/client
Import package
import Xoal from "@xoal/client"
Once the package has been imported. You will need to authenticate with your key and identify user.
using React / NextJS.
useEffect(() => {
Xoal.auth("WIDGET_KEY")
Xoal.identify("USER_ID")
}, [])
Be sure to replace WIDGET_KEY
with your actual widget key. Replace USER_ID
with the user's ID (usid
field in person profile) or user's email.