Skip to content

Commit

Permalink
update google analytics tag id
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyadetman committed Jan 1, 2024
1 parent 46d2f41 commit 90a4376
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion quartz.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config: QuartzConfig = {
enablePopovers: true,
analytics: {
provider: "google",
tagId: "QEXV76M819",
tagId: "G-QEXV76M819",
},
baseUrl: "notes.zeyadetman.com",
ignorePatterns: ["private", "templates", ".obsidian"],
Expand Down
6 changes: 3 additions & 3 deletions quartz/plugins/emitters/componentResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function addGlobalPageResources(
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag(\`js\`, new Date());
gtag(\`config\`, \`${tagId}\`, { send_page_view: false });
gtag(\`config\`, \`${tagId}\`, { send_page_view: true });
document.addEventListener(\`nav\`, () => {
gtag(\`event\`, \`page_view\`, {
page_title: document.title,
Expand All @@ -102,7 +102,7 @@ function addGlobalPageResources(
umamiScript.src = "https://analytics.umami.is/script.js"
umamiScript.setAttribute("data-website-id", "${cfg.analytics.websiteId}")
umamiScript.async = true
document.head.appendChild(umamiScript)
`)
}
Expand Down

0 comments on commit 90a4376

Please sign in to comment.