feat: add Intelliticks chat widget
This commit is contained in:
parent
a1c0ba2e51
commit
294ae759b4
3 changed files with 38 additions and 1 deletions
35
components/Chat.jsx
Normal file
35
components/Chat.jsx
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
// components/Intelliticks.js
|
||||
"use client"
|
||||
import { useEffect } from "react";
|
||||
|
||||
// Component for Intelliticks chat widget
|
||||
const Chat = () => {
|
||||
useEffect(() => {
|
||||
// Paste the Intelliticks script here
|
||||
(function (I, L, T, i, c, k, s) {
|
||||
if (I.iticks) return;
|
||||
I.iticks = { host: c, settings: s, clientId: k, cdn: L, queue: [] };
|
||||
var h = T.head || T.documentElement;
|
||||
var e = T.createElement(i);
|
||||
var l = I.location;
|
||||
e.async = true;
|
||||
e.src = (L || c) + "/client/inject-v2.min.js";
|
||||
h.insertBefore(e, h.firstChild);
|
||||
I.iticks.call = function (a, b) {
|
||||
I.iticks.queue.push([a, b]);
|
||||
};
|
||||
})(
|
||||
window,
|
||||
"https://cdn-v1.intelliticks.com/prod/common",
|
||||
document,
|
||||
"script",
|
||||
"https://app.intelliticks.com",
|
||||
"u3cWw3sDpdKexqXCY_c",
|
||||
{}
|
||||
);
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
export default Chat;
|
||||
Loading…
Add table
Add a link
Reference in a new issue