diff --git a/lib/gtag.js b/lib/gtag.js index 08c7ed2..4086f00 100755 --- a/lib/gtag.js +++ b/lib/gtag.js @@ -1,4 +1,6 @@ -export const GA_TRACKING_ID = 'G-HDSXTW54QC' +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) => { diff --git a/next.config.js b/next.config.js index e182298..2afb30c 100755 --- a/next.config.js +++ b/next.config.js @@ -11,12 +11,13 @@ 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 + strapi_token: process.env.STRAPI_TOKEN, + gtag: process.env.GTAG }, images: { domains: ['www.angrybeanie.com', 'localhost', 'cms.local.angrybeanie.com'] }, publicRuntimeConfig: { - analytics_code: 'UA-2497299-19' + analytics_code: process.env.GTAG } } \ No newline at end of file diff --git a/pages/galleries/[gallery].js b/pages/galleries/[gallery].js index a34d19b..a0956a5 100755 --- a/pages/galleries/[gallery].js +++ b/pages/galleries/[gallery].js @@ -3,6 +3,8 @@ import getConfig from 'next/config' import Layout from "../../components/main.js" import { getGallery, getGalleryImages } from "../../data/external/cms.js" import GalleryPager from "../../components/gallerypager.js" +import Head from 'next/head' +import config from "../../data/internal/config" export async function getServerSideProps(context) { @@ -19,7 +21,7 @@ export async function getServerSideProps(context) { const { serverRuntimeConfig } = getConfig() const pagedata = { - 'title': "Angry Beanie - " + gallery.Title + 'title': "Angry Beanie - " + gallery.data[0].attributes.Title } return { @@ -32,6 +34,14 @@ const Gallery = ({pagedata, gallery, galleryImages, serverRuntimeConfig}) => { console.log(gallery) return( + + + + + + + +

{gallery.attributes.Title}

diff --git a/pages/news/[slug].js b/pages/news/[slug].js index 3141676..eb8c8f1 100755 --- a/pages/news/[slug].js +++ b/pages/news/[slug].js @@ -47,7 +47,7 @@ const Article = ({article_obj, sections, pagedata, stories, serverRuntimeConfig, { article_obj.FeatureImage.data != null && } -

{ article_obj.Title }

+

{ article_obj.Title }

diff --git a/pages/podcasts/shows/[podcast].js b/pages/podcasts/shows/[podcast].js index f0a6d78..1a26064 100755 --- a/pages/podcasts/shows/[podcast].js +++ b/pages/podcasts/shows/[podcast].js @@ -30,7 +30,7 @@ export async function getServerSideProps(context) { } const Podcast = (props) => ( -

{props.showdata.title}

+

{props.showdata.title}

diff --git a/pages/tech-and-disability.js b/pages/tech-and-disability.js index 405e851..69b80ca 100755 --- a/pages/tech-and-disability.js +++ b/pages/tech-and-disability.js @@ -37,7 +37,7 @@ function Project({ articles, sections, pagedata, project, rssFeed }) { -

{project.data[0].attributes.Title}

+

{project.data[0].attributes.Title}