Skip to content

Commit

Permalink
feat(config): add analytics (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
schwannden authored Jul 25, 2024
1 parent 92c0a25 commit 6f06022
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Timothy Lin
Copyright (c) 2024 Schwannden Kuo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion app/tag-data.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"child":30,"blessing":92,"husband":31,"wife":31,"luke-prayer":6,"spiritual-formation":6}
{"child":30,"blessing":92,"husband":31,"luke-prayer":6,"spiritual-formation":6,"wife":31}
12 changes: 6 additions & 6 deletions data/siteMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const siteMetadata = {
// If you want to use an analytics provider you have to add it to the
// content security policy in the `next.config.js` file.
// supports Plausible, Simple Analytics, Umami, Posthog or Google Analytics.
umamiAnalytics: {
// umamiAnalytics: {
// We use an env variable for this site to avoid other users cloning our analytics ID
umamiWebsiteId: process.env.NEXT_UMAMI_ID, // e.g. 123e4567-e89b-12d3-a456-426614174000
// umamiWebsiteId: process.env.NEXT_UMAMI_ID, // e.g. 123e4567-e89b-12d3-a456-426614174000
// You may also need to overwrite the script if you're storing data in the US - ex:
// src: 'https://us.umami.is/script.js'
// Remember to add 'us.umami.is' in `next.config.js` as a permitted domain for the CSP
},
// },
// plausibleAnalytics: {
// plausibleDataDomain: '', // e.g. tailwind-nextjs-starter-blog.vercel.app
// If you are hosting your own Plausible.
Expand All @@ -35,9 +35,9 @@ const siteMetadata = {
// posthogAnalytics: {
// posthogProjectApiKey: '', // e.g. 123e4567-e89b-12d3-a456-426614174000
// },
// googleAnalytics: {
// googleAnalyticsId: '', // e.g. G-XXXXXXX
// },
googleAnalytics: {
googleAnalyticsId: 'G-6HMX72E2JC', // e.g. G-XXXXXXX
},
},
newsletter: {},
comments: {
Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
// You might need to insert additional domains in script-src if you are using external services
const ContentSecurityPolicy = `
default-src 'self';
script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app analytics.umami.is;
script-src 'self' 'unsafe-eval' 'unsafe-inline' www.googletagmanager.com www.google-analytics.com;
style-src 'self' 'unsafe-inline';
img-src * blob: data:;
media-src *.s3.amazonaws.com;
connect-src *;
connect-src * www.google-analytics.com www.googletagmanager.com;
font-src 'self';
frame-src giscus.app
`
Expand Down

0 comments on commit 6f06022

Please sign in to comment.