From c0ccc264e7baa6a2efad3f481d95d0a0659c9e65 Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Fri, 30 Aug 2024 22:44:21 +0900 Subject: [PATCH] chore: upgrade preset version --- package.json | 2 +- src/components/Fathom.tsx | 9 ++++++--- yarn.lock | 18 +++++++++--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 09a90c8..0b064e7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "@acid-info/docusaurus-fathom": "^1.0.0-alpha.111", - "@acid-info/logos-docusaurus-preset": "v1.0.0-alpha.180", + "@acid-info/logos-docusaurus-preset": "v1.0.0-alpha.181", "@docusaurus/core": "2.4.1", "@docusaurus/preset-classic": "2.4.1", "@docusaurus/theme-mermaid": "^2.4.1", diff --git a/src/components/Fathom.tsx b/src/components/Fathom.tsx index 0d67c7c..74cf1a8 100644 --- a/src/components/Fathom.tsx +++ b/src/components/Fathom.tsx @@ -80,13 +80,16 @@ const virtualPath = \`\${currentUrl}_form_submission_\${utmSource}\` if (utmSource) { console.log(\`utm - \${utmSource}\`); console.log(\`current url - \${currentUrl}\`); - console.log(\`virtual path - \${virtualPath}\`); fathom.trackEvent(\`form submission - \${utmSource}\`); - fathom.trackPageview({ - url: virtualPath + // listen for form submission + document.addEventListener('submit', function(e) { + console.log('form submitted'); + console.log(\`virtual path - \${virtualPath}\`); + fathom.trackEvent(\`form submission - \${utmSource}\`); }); + } ` document.body.appendChild(script) diff --git a/yarn.lock b/yarn.lock index f2ea889..5c42359 100644 --- a/yarn.lock +++ b/yarn.lock @@ -36,14 +36,14 @@ satori "^0.10.1" sharp "^0.32.1" -"@acid-info/logos-docusaurus-preset@v1.0.0-alpha.180": - version "1.0.0-alpha.180" - resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.180.tgz#a0725edf9ecd62e46e36f67d6e10373cf21860f2" - integrity sha512-sNfTqcR6e4RvwcP6zDjfzGjtLAqAWKPRvJ2IG3zS7qx3iLU6zVFni4ooowPShFyENPbFTX5p5Znz5GSsi/2z8Q== +"@acid-info/logos-docusaurus-preset@v1.0.0-alpha.181": + version "1.0.0-alpha.181" + resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.181.tgz#31e42de1b84f6e145368e5f252aafd42983b15a9" + integrity sha512-KvMyDGFwst7P5HzlWQ4G08Q6Ep9gPZ9mt35nBN7dksiVzu1heVj3hfY91of2u1EXZszHDmzztU1iqoGYNinOhg== dependencies: "@acid-info/docusaurus-og" "^1.0.0-alpha.131" "@acid-info/logos-docusaurus-search-local" "^1.0.0-alpha.111" - "@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.180" + "@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.181" "@docusaurus/core" "^2.4.1" "@docusaurus/module-type-aliases" "^2.4.1" "@docusaurus/preset-classic" "^2.4.1" @@ -71,10 +71,10 @@ "@easyops-cn/docusaurus-search-local" "^0.33.6" lodash "^4.17.21" -"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.180": - version "1.0.0-alpha.180" - resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.180.tgz#3ea7db1ca4656a70b27e54211851fa19cbe3df38" - integrity sha512-oWkIKmONNW/lXW61HHogfUZ7oif9D/fQhdgLmEoF1JJ9qxpm3nEVc/O8TcAPdwSkrL4KIlHl3Jj542DN1YIPYQ== +"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.181": + version "1.0.0-alpha.181" + resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.181.tgz#c68946a3372700284f2b9d0d4fc8cd7fc576125c" + integrity sha512-hKLClMNHMrVhoApz+uY096tLAswScKq/FXUGb3VeY675QO75P1OMaPAKdKLnFeLXTRs3lbU3TA6YpkwEZDiJAA== dependencies: "@acid-info/docusaurus-og" "^1.0.0-alpha.131" "@acid-info/lsd-react" "^0.1.0-beta.3"