panphp / pan

A simple, lightweight, and privacy-focused product analytics php package
MIT License
1.07k stars 48 forks source link

Add note to README.md #27

Closed austincarpenter closed 3 weeks ago

austincarpenter commented 3 weeks ago

This PR adds the following notice to the README:

[!IMPORTANT]
Event names must only contain letters, numbers, dashes, and underscores.

I feel this is important otherwise users may wonder why certain events do not appear to be tracked.

There's probably a case for allowing periods . in event names but that can be a separate PR.

Background: Without diving into the source code, it wasn't obvious to me that certain event names would be discarded. In my case it was a quote-form.started event, which took inspiration from cache key naming conventions in Laravel.

austincarpenter commented 3 weeks ago

In relation to https://github.com/panphp/pan/pull/28, I've used Laravel's en validation string "...must only contain letters, numbers, dashes, and underscores".