Remove custom analytics in favor of Vercel defaults
The changes remove custom analytics tracking in favor of using Vercel's default page view tracking functionality.
This commit is contained in:
@@ -22,12 +22,7 @@ import { Skeleton } from "~/components/ui/skeleton";
|
||||
import { CardSkeleton } from "~/components/ui/skeletons";
|
||||
import type { Publication } from "~/lib/bibtex";
|
||||
import { parseBibtex } from "~/lib/bibtex";
|
||||
import {
|
||||
trackPdfView,
|
||||
trackDoiClick,
|
||||
trackBibtexDownload,
|
||||
trackSlidesView,
|
||||
} from "~/lib/analytics";
|
||||
// No custom tracking needed - Vercel automatically tracks page views
|
||||
|
||||
export default function PublicationsPage() {
|
||||
const [publications, setPublications] = useState<Publication[]>([]);
|
||||
@@ -45,15 +40,6 @@ export default function PublicationsPage() {
|
||||
}, []);
|
||||
|
||||
const downloadBibtex = (pub: Publication) => {
|
||||
// Track the BibTeX download
|
||||
trackBibtexDownload({
|
||||
publicationTitle: pub.title,
|
||||
publicationType: pub.type,
|
||||
publicationYear: pub.year,
|
||||
citationKey: pub.citationKey,
|
||||
venue: pub.venue,
|
||||
});
|
||||
|
||||
const {
|
||||
title,
|
||||
authors,
|
||||
@@ -95,50 +81,7 @@ export default function PublicationsPage() {
|
||||
URL.revokeObjectURL(url);
|
||||
};
|
||||
|
||||
const handlePaperClick = (pub: Publication) => {
|
||||
trackPdfView({
|
||||
publicationTitle: pub.title,
|
||||
publicationType: pub.type,
|
||||
publicationYear: pub.year,
|
||||
citationKey: pub.citationKey,
|
||||
venue: pub.venue,
|
||||
pdfType: "paper",
|
||||
});
|
||||
};
|
||||
|
||||
const handlePosterClick = (pub: Publication) => {
|
||||
trackPdfView({
|
||||
publicationTitle: pub.title,
|
||||
publicationType: pub.type,
|
||||
publicationYear: pub.year,
|
||||
citationKey: pub.citationKey,
|
||||
venue: pub.venue,
|
||||
pdfType: "poster",
|
||||
});
|
||||
};
|
||||
|
||||
const handleDoiClick = (pub: Publication) => {
|
||||
if (pub.doi) {
|
||||
trackDoiClick({
|
||||
publicationTitle: pub.title,
|
||||
publicationType: pub.type,
|
||||
publicationYear: pub.year,
|
||||
citationKey: pub.citationKey,
|
||||
venue: pub.venue,
|
||||
doi: pub.doi,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleSlidesClick = (pub: Publication) => {
|
||||
trackSlidesView({
|
||||
publicationTitle: pub.title,
|
||||
publicationType: pub.type,
|
||||
publicationYear: pub.year,
|
||||
citationKey: pub.citationKey,
|
||||
venue: pub.venue,
|
||||
});
|
||||
};
|
||||
// No custom click handlers needed - Vercel automatically tracks API route access
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
@@ -179,7 +122,6 @@ export default function PublicationsPage() {
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-muted-foreground hover:text-primary sm:flex-shrink-0"
|
||||
onClick={() => handlePaperClick(pub)}
|
||||
>
|
||||
<ArrowUpRight className="h-5 w-5" />
|
||||
</Link>
|
||||
@@ -222,7 +164,6 @@ export default function PublicationsPage() {
|
||||
href={`https://doi.org/${pub.doi}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => handleDoiClick(pub)}
|
||||
>
|
||||
<Badge
|
||||
variant="secondary"
|
||||
@@ -238,7 +179,6 @@ export default function PublicationsPage() {
|
||||
href={pub.paperUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => handlePaperClick(pub)}
|
||||
>
|
||||
<Badge
|
||||
variant="secondary"
|
||||
@@ -254,7 +194,6 @@ export default function PublicationsPage() {
|
||||
href={pub.posterUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => handlePosterClick(pub)}
|
||||
>
|
||||
<Badge
|
||||
variant="secondary"
|
||||
@@ -270,7 +209,6 @@ export default function PublicationsPage() {
|
||||
href={pub.slidesUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => handleSlidesClick(pub)}
|
||||
>
|
||||
<Badge
|
||||
variant="secondary"
|
||||
|
||||
Reference in New Issue
Block a user