Skip to content

Commit ef0e890

Browse files
docs - add cr
1 parent 6a74050 commit ef0e890

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

docs-v2/components/CR.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Script from "next/script";
2+
3+
export default function RB2B() {
4+
return (
5+
<Script strategy="lazyOnload">
6+
{
7+
`
8+
!function () {if (typeof window === "undefined") return;if (typeof window.signals !== "undefined") return;var script = document.createElement("script");script.src = "https://cdn.cr-relay.com/v1/site/80b683ec-139c-45c4-92e4-900b361a91a2/signals.js";script.async = true;window.signals = Object.assign([],["page", "identify", "form"].reduce(function (acc, method) {acc[method] = function () {signals.push([method, arguments]);return signals;};return acc;}, {}));document.head.appendChild(script);}();
9+
`
10+
}
11+
</Script>
12+
);
13+
}

docs-v2/pages/_app.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { AppProps } from "next/app";
33
import { Analytics } from "@vercel/analytics/react";
44
import { useRouter } from "next/router";
55

6+
import CR from "@/components/CR";
67
import RB2B from "@/components/RB2B";
78
import Vector from "@/components/Vector";
89

@@ -15,7 +16,12 @@ export default function MyApp({
1516
if (router.pathname === "/") {
1617
script = <Vector />;
1718
} else if (router.pathname.startsWith("/connect")) {
18-
script = <RB2B />;
19+
script = (
20+
<>
21+
<CR />
22+
<RB2B />
23+
</>
24+
);
1925
}
2026

2127
return <>

0 commit comments

Comments
 (0)