diff --git a/index.d.ts b/index.d.ts index fb2765f..77f6837 100644 --- a/index.d.ts +++ b/index.d.ts @@ -157,5 +157,6 @@ export type SimplyticsTracker = { declare global { interface Window { simplytics: SimplyticsTracker + umami: SimplyticsTracker } } diff --git a/src/components/BlogCard/BlogCard.tsx b/src/components/BlogCard/BlogCard.tsx index 7642a0a..2f6c19d 100644 --- a/src/components/BlogCard/BlogCard.tsx +++ b/src/components/BlogCard/BlogCard.tsx @@ -54,7 +54,7 @@ export const BlogCard = ({ { - window.simplytics.track('blog-card-clicked', { + window.umami.track('blog-card-clicked', { name: 'blog-post-back-btn', data: { href, title }, }) diff --git a/src/pages/blog/[slug].tsx b/src/pages/blog/[slug].tsx index afcf660..12820fa 100644 --- a/src/pages/blog/[slug].tsx +++ b/src/pages/blog/[slug].tsx @@ -75,7 +75,7 @@ const PostPage = ({ { - window.simplytics.track('blog-post-back-btn', { + window.umami.track('blog-post-back-btn', { name: 'blog-post-back-btn', data: { title: prevPost.title, @@ -135,7 +135,7 @@ const PostPage = ({ href={`/blog/${prevPost.slug}`} className="py-8 px-10 text-center md:text-right first:rounded-t-lg md:first:rounded-tr-none md:first:rounded-l-lg last:rounded-r-lg first last:rounded-b-lg backdrop-blur-lg bg-slate-50 bg-opacity-100 dark:bg-opacity-10 hover:bg-opacity-30 dark:hover:bg-opacity-20 transition border border-gray-800 border-opacity-10 last:border-t md:border-r-0 md:last:border-r md:last:rounded-r-none flex flex-col" onClick={() => { - window.simplytics.track('change-post-btn', { + window.umami.track('change-post-btn', { name: 'blog-post-back-btn', data: { href: `/blog/${prevPost.slug}`, @@ -158,7 +158,7 @@ const PostPage = ({ href={`/blog/${nextPost.slug}`} className="py-8 px-10 text-center md:text-left md:first:rounded-t-lg last:rounded-b-lg first:rounded-l-lg md:last:rounded-bl-none md:last:rounded-r-lg backdrop-blur-lg bg-slate-50 bg-opacity-100 dark:bg-opacity-10 hover:bg-opacity-30 dark:hover:bg-opacity-20 transition border border-gray-800 border-opacity-10 border-t-0 first:border-t first:rounded-t-lg md:border-t border-b-0 last:border-b flex flex-col" onClick={() => { - window.simplytics.track('change-post-btn', { + window.umami.track('change-post-btn', { name: 'blog-post-back-btn', data: { href: `/blog/${nextPost.slug}`, diff --git a/src/pages/linktree.tsx b/src/pages/linktree.tsx index 2b9b4fb..6087192 100644 --- a/src/pages/linktree.tsx +++ b/src/pages/linktree.tsx @@ -137,7 +137,7 @@ const LinksPage = () => { href={href} className="flex justify-center font-medium cursor-pointer rounded-full border border-slate-900 hover:hover:bg-indigo-300 dark:hover:hover:bg-indigo-500 px-10 py-4 mb-4 text-slate-900 dark:text-gray-300 bg-white dark:bg-gray-600" onClick={() => { - window.simplytics.track('linktree-button-clicked', { + window.umami.track('linktree-button-clicked', { name: 'linktree-button-clicked', data: { href,