logos-kit 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GoogleAnalytics.tsx +4 -2
- package/package.json +1 -1
package/GoogleAnalytics.tsx
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import Script from "next/script";
|
|
4
4
|
import type { ReactElement } from "react";
|
|
5
|
+
import ClickTracker from "./ClickTracker";
|
|
5
6
|
|
|
6
7
|
type Props = {
|
|
7
8
|
measurementId: string | undefined;
|
|
@@ -16,11 +17,12 @@ export default function GoogleAnalytics({
|
|
|
16
17
|
<>
|
|
17
18
|
<Script
|
|
18
19
|
src={`https://www.googletagmanager.com/gtag/js?id=${measurementId}`}
|
|
19
|
-
strategy="
|
|
20
|
+
strategy="lazyOnload"
|
|
20
21
|
/>
|
|
21
|
-
<Script id="ga-init" strategy="
|
|
22
|
+
<Script id="ga-init" strategy="lazyOnload">
|
|
22
23
|
{`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','${measurementId}');`}
|
|
23
24
|
</Script>
|
|
25
|
+
<ClickTracker />
|
|
24
26
|
</>
|
|
25
27
|
);
|
|
26
28
|
}
|