Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2fff286afb
commit
5be5bda079
2 files changed
+8
-3
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
import localFont from "next/font/local";
|
import localFont from "next/font/local";
|
||||||
|
import Script from "next/script";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import Navbar from "./components/Navbar";
|
import Navbar from "./components/Navbar";
|
||||||
import Footer from "./components/Footer";
|
import Footer from "./components/Footer";
|
||||||
@@ -34,6 +35,10 @@ export default function RootLayout({ children }) {
|
|||||||
{children}
|
{children}
|
||||||
<Footer />
|
<Footer />
|
||||||
<AnalyticsEvents />
|
<AnalyticsEvents />
|
||||||
|
<Script
|
||||||
|
src="https://analytics.cloudrite.co.nz/api/script.js?siteId=362da09a6cea"
|
||||||
|
strategy="afterInteractive"
|
||||||
|
/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// Sends a custom event to Plausible if its script is installed; otherwise does nothing.
|
// Sends a custom event to Rybbit once its script has loaded; otherwise does nothing.
|
||||||
// Events: click_call, click_text, click_email, submit_quote_form, click_google_reviews.
|
// Events: click_call, click_text, click_email, submit_quote_form, click_google_reviews.
|
||||||
export function trackEvent(name) {
|
export function trackEvent(name) {
|
||||||
if (typeof window !== "undefined" && typeof window.plausible === "function") {
|
if (typeof window !== "undefined" && window.rybbit) {
|
||||||
window.plausible(name);
|
window.rybbit.event(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user