Skip to content

Commit

Permalink
Track static file downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed Jul 19, 2024
1 parent 0317f05 commit 8dad30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dito/app/routes/download.$fileName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function loader({ params, request }: LoaderFunctionArgs) {
const fileData = await fs.readFile(filePath);
const mimeType = mime.contentType(fileName) || "";

void trackCustomEvent(request, { name: `Download ${filePath}` });
void trackCustomEvent(request, { name: `Download`, props: { fileName } });
return new Response(fileData, {
status: 200,
headers: {
Expand Down

0 comments on commit 8dad30d

Please sign in to comment.