add help scout support chat for Pro users
This commit is contained in:
parent
2f260f5442
commit
29978828a4
@ -16,6 +16,32 @@
|
|||||||
<!-- Injected code for hosted version -->
|
<!-- Injected code for hosted version -->
|
||||||
<%- injectHead %>
|
<%- injectHead %>
|
||||||
|
|
||||||
|
<!-- Help Scout -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
!(function (e, t, n) {
|
||||||
|
function a() {
|
||||||
|
var e = t.getElementsByTagName("script")[0],
|
||||||
|
n = t.createElement("script");
|
||||||
|
(n.type = "text/javascript"),
|
||||||
|
(n.async = !0),
|
||||||
|
(n.src = "https://beacon-v2.helpscout.net"),
|
||||||
|
e.parentNode.insertBefore(n, e);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
((e.Beacon = n =
|
||||||
|
function (t, n, a) {
|
||||||
|
e.Beacon.readyQueue.push({ method: t, options: n, data: a });
|
||||||
|
}),
|
||||||
|
(n.readyQueue = []),
|
||||||
|
"complete" === t.readyState)
|
||||||
|
)
|
||||||
|
return a();
|
||||||
|
e.attachEvent
|
||||||
|
? e.attachEvent("onload", a)
|
||||||
|
: e.addEventListener("load", a, !1);
|
||||||
|
})(window, document, window.Beacon || function () {});
|
||||||
|
</script>
|
||||||
|
|
||||||
<title>Screenshot to Code</title>
|
<title>Screenshot to Code</title>
|
||||||
|
|
||||||
<!-- Open Graph Meta Tags -->
|
<!-- Open Graph Meta Tags -->
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export function PicoBadge() {
|
|||||||
<div>
|
<div>
|
||||||
<PricingDialog />
|
<PricingDialog />
|
||||||
</div>
|
</div>
|
||||||
<a
|
{/* <a
|
||||||
href="https://screenshot-to-code.canny.io/feature-requests"
|
href="https://screenshot-to-code.canny.io/feature-requests"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
@ -16,7 +16,7 @@ export function PicoBadge() {
|
|||||||
>
|
>
|
||||||
feedback
|
feedback
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a> */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,13 @@ function AppContainer() {
|
|||||||
last_name: user.last_name,
|
last_name: user.last_name,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize Help Scout Beacon
|
||||||
|
window.Beacon("init", "8bcd8d6f-f25d-4339-8f49-703b9f165cdc");
|
||||||
|
window.Beacon("identify", {
|
||||||
|
name: user.first_name + " " + user.last_name,
|
||||||
|
email: user.email,
|
||||||
|
});
|
||||||
|
|
||||||
setSubscriberTier(user.subscriber_tier);
|
setSubscriberTier(user.subscriber_tier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
frontend/src/help-scout.d.ts
vendored
Normal file
11
frontend/src/help-scout.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// help-scout.d.ts
|
||||||
|
type Beacon = (eventName: string, options?: any) => void;
|
||||||
|
|
||||||
|
// Extend the Window interface to include the `plausible` function
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
Beacon: Beacon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {};
|
||||||
Loading…
Reference in New Issue
Block a user