Firesquad Widget
Guide
Install
npm i @firesquad/widget --save
yarn add @firesquad/widget
React
on your index file:
import React, { useEffect } from 'react'
import Firesquad from '@firesquad/widget'
const appId = 'xxx' // Get your appId https://app.firesquad.io
const App = () => {
useEffect(() => {
Firesquad(appId)
}, [])
}
Html
- Add the script with your key (replace
xxxx
with your key)
<script src="https://unpkg.com/@firesquad/widget@latest/dist/index.js?key=xxxx"></script>
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<script src="https://unpkg.com/@firesquad/widget@latest/dist/index.js?key=xxxx"></script>
</body>
</html>