Open j-f1 opened 6 years ago
Hey @j-f1, I'm using a single MicroAnalytics instance to track all of my sites. I prefix the path with a 'namespace', like so:-
fetch(`https://my-micro.analytics/my-website.com${location.pathname}`)
// => https://my-micro.analytics/my-website.com/this-is-the-path/
I know adding a generic namespace like 'website' might no be ideal, but it works in this case. Tip: test using ?inc=false
initially to ensure that the string template/concatenation is working as expected before entries are added – getting the slashes right can be a bit of a pain at times.
Attempting to
GET
the/
endpoint yieldsPlease include a path to a page.
on the client and:in the server logs. Is there any way to track events at the root page?
For example, running
fetch(`https://my-micro.analytics/${location.pathname}`)
doesn’t record visits to the homepage.