Skip to content

Commit

Permalink
#45 feat: gtag 설정 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
msung99 committed May 16, 2024
1 parent 18c7333 commit f125d0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const metaConfig = require("./meta-config")
const {title, description, author, siteUrl, keywords, repo, socialLinks} = metaConfig
const {title, description, author, siteUrl, keywords, repo, socialLinks, gtag} = metaConfig

module.exports = {
siteMetadata: {
Expand All @@ -9,7 +9,8 @@ module.exports = {
siteUrl,
keywords,
repo,
socialLinks
socialLinks,
gtag
},
plugins: [
{
Expand Down Expand Up @@ -69,7 +70,7 @@ module.exports = {
{
resolve: "gatsby-plugin-gtag",
options: {
trackingId: ["G-CD9E7GB2ED"],
trackingId: [gtag],
},
},
`gatsby-plugin-sharp`,
Expand Down
1 change: 1 addition & 0 deletions meta-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
siteUrl: `https://gatsby-starter-haon.netlify.app`,
keywords: [`server`, `backend`, `gatsby`],
repo: 'msung99/Gatsby-Starter-Haon',
gtag: 'G-CD9E7GB2ED', // with. Google Analytics
socialLinks: {
github: 'https://github.com/msung99',
instagram: 'https://www.instagram.com/iminseong920/',
Expand Down

0 comments on commit f125d0d

Please sign in to comment.