diff --git a/components/audioplayer.js b/components/audioplayer.js
index c7ebc78..27cad1c 100755
--- a/components/audioplayer.js
+++ b/components/audioplayer.js
@@ -7,7 +7,6 @@ const AbAudioPlayer = (audiodata) => {
gtag.event({action: "play", category:"audio", label: "audio started", value: audiodata.audio_mp3})}
onPlay={_paq.push(['trackEvent', 'Podcasts', 'Play Podcast', audiodata.audio_mp3])}
/>
diff --git a/lib/gtag.js b/lib/gtag.js
deleted file mode 100755
index 4086f00..0000000
--- a/lib/gtag.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export const GA_TRACKING_ID = process.env.GTAG //'G-HDSXTW54QC'
-
-console.log(GA_TRACKING_ID)
-
-// https://developers.google.com/analytics/devguides/collection/gtagjs/pages
-export const pageview = (url) => {
- window.gtag('config', GA_TRACKING_ID, {
- page_path: url,
- })
- console.log("Page view action")
-}
-
-// https://developers.google.com/analytics/devguides/collection/gtagjs/events
-export const event = ({ action, category, label, value }) => {
- window.gtag('event', action, {
- event_category: category,
- event_label: label,
- value: value,
- })
- console.log("event sent: " + action + ":" + category + ":" + label + ":" + value)
-}
diff --git a/next.config.js b/next.config.js
index f6a0e48..0b96077 100755
--- a/next.config.js
+++ b/next.config.js
@@ -11,13 +11,11 @@ module.exports = {
base_path: 'http://localhost:1337/api/',
audio_path: 'https://audio.angrybeanie.com/',
media_path: process.env.MEDIA_BASE,
- strapi_token: process.env.STRAPI_TOKEN,
- gtag: process.env.GTAG
+ strapi_token: process.env.STRAPI_TOKEN
},
images: {
domains: ['www.angrybeanie.com', 'localhost', 'cms.local.angrybeanie.com', '127.0.0.1']
},
publicRuntimeConfig: {
- analytics_code: process.env.GTAG
}
}
\ No newline at end of file
diff --git a/pages/_app.js b/pages/_app.js
index 97b9016..76ef4e1 100755
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -6,12 +6,10 @@ import { Fragment, useEffect } from 'react';
import "../components/css/styles.css"
import { Router, useRouter } from 'next/router'
-//Router.events.on('routeChangeComplete', (url) => gtag.pageview(url))
-
import { init } from "@socialgouv/matomo-next";
-const MATOMO_URL = "https://analytics.angrybeanie.com";
-const MATOMO_SITE_ID = 2;
+const MATOMO_URL = process.env.NEXT_PUBLIC_MATOMO_URL;
+const MATOMO_SITE_ID = process.env.NEXT_PUBLIC_MATOMO_SITE_ID;
console.log(MATOMO_URL);
@@ -19,8 +17,7 @@ function MyApp({ Component, pageProps }) {
const router = useRouter()
useEffect(() => {
const handleRouteChange = (url) => {
- // gtag.pageview(url);
- // console.log("Pageview is happening")
+
};
init({ url: MATOMO_URL, siteId: MATOMO_SITE_ID });
router.events.on("routeChangeComplete", handleRouteChange);
diff --git a/pages/_document.js b/pages/_document.js
index 9dc3c71..b4df776 100755
--- a/pages/_document.js
+++ b/pages/_document.js
@@ -2,32 +2,12 @@ import Document, { Html, Head, Main, NextScript } from 'next/document';
import React from 'react';
import { Fragment } from 'react'
-import { GA_TRACKING_ID } from '../lib/gtag'
-
class CustomDocument extends Document {
render() {
return (
- {/* Global Site Tag (gtag.js) - Google Analytics */}
-
-
diff --git a/pages/news/[slug].js b/pages/news/[slug].js
index 4b34615..6f25f3d 100755
--- a/pages/news/[slug].js
+++ b/pages/news/[slug].js
@@ -5,7 +5,6 @@ import FeatureImage from "../../components/featureimage.js"
import StorySideBar from '../../components/storysidebar.js'
import PublishedInfo from '../../components/publishedinfo.js'
import { getAllPosts, getSinglePost } from '../../data/external/cms'
-import * as gtag from "../../lib/gtag"
import Image from "next/legacy/image";
import Head from 'next/head'
import config from "../../data/internal/config"
diff --git a/pages/podcasts/shows/[...episode].js b/pages/podcasts/shows/[...episode].js
index fee2cc3..a72e85d 100755
--- a/pages/podcasts/shows/[...episode].js
+++ b/pages/podcasts/shows/[...episode].js
@@ -1,7 +1,6 @@
import { useRouter } from 'next/router'
import getConfig from 'next/config'
import Layout from "../../../components/main.js"
-import * as gtag from "../../../lib/gtag"
import AudioPlayer from "react-h5-audio-player";
import 'react-h5-audio-player/lib/styles.css';
import EpisodeSideBar from "../../../components/episodesidebar"