gurkz-oss / astroutils

a set of utilities for your astro apps
https://docs.gurkz.me/
2 stars 0 forks source link

feature: add so that you can track events #10

Open thatgurkangurk opened 6 months ago

thatgurkangurk commented 6 months ago

currently it only tracks pageviews, but you might want to track events (like clicking a button).

the best case scenario is if the API is analytics provider-agnostic

thatgurkangurk commented 6 months ago

one idea I have is that the API for tracking events should look like this

import { track } from "@astroutils/analytics/event"; // (or @astroutils/analytics/[your provider]

track("event name");

however, this design is not final