mirror of
https://github.com/netbirdio/docs.git
synced 2026-09-09 00:21:26 +02:00
Add cookies popup (#690)
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import Script from "next/script";
|
||||
|
||||
export function MatomoTagManager() {
|
||||
export function MatomoTagManager({ consentGiven }) {
|
||||
return (
|
||||
<Script id="matomo-tag-manager" strategy="afterInteractive">
|
||||
{`var _mtm = window._mtm = window._mtm || [];
|
||||
{`var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['requireCookieConsent']);
|
||||
${consentGiven ? "_paq.push(['setCookieConsentGiven']);" : ""}
|
||||
var _mtm = window._mtm = window._mtm || [];
|
||||
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
|
||||
(function() {
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
|
||||
Reference in New Issue
Block a user