Skip to content

Commit

Permalink
구글 애드센스 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
pej4303 committed Aug 26, 2024
1 parent 4de592a commit f8acc62
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
17 changes: 7 additions & 10 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ module.exports = {
resolve: "gatsby-plugin-gtag",
options: {
trackingId: [gtag] , // 수정: 배열이 필요 없을 수 있습니다.
// Google Analytics 관련 설정
// gtagConfig: {
// anonymize_ip: true, // 사용자 IP 익명화
// cookie_expires: 0, // 쿠키 만료 기간 설정
// },
// // 플러그인 설정
// pluginConfig: {
// head: true, // true로 설정하면 <head>에 스크립트가 추가됨
// respectDNT: true, // Do Not Track를 지원
// },
},
},
`gatsby-plugin-sharp`,
Expand Down Expand Up @@ -133,5 +123,12 @@ module.exports = {
policy: [{ userAgent: '*', allow: '/' }],
},
},
{ // 2024.08.26 : 구글 애드센스 추가
resolve: `gatsby-plugin-google-adsense`,
options: {
googleAdClientId: "ca-pub-9127237138926489", // 애드센스에서 제공한 광고 클라이언트 ID
head: true, // true로 설정하면 <head>에 스크립트가 삽입됩니다.
},
},
],
};
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"gatsby": "^5.13.2",
"gatsby-plugin-feed": "^5.13.1",
"gatsby-plugin-fusejs": "^2.0.2",
"gatsby-plugin-google-adsense": "^1.1.3",
"gatsby-plugin-google-gtag": "^5.13.1",
"gatsby-plugin-gtag": "^1.0.13",
"gatsby-plugin-image": "^3.13.1",
Expand Down

0 comments on commit f8acc62

Please sign in to comment.