Open jbmoelker opened 1 year ago
Should we add an agnostic layer like the analytics
package by David Wells (~13.2kb minified + gzipped)? This way Head Start can easily be used with different analytics providers in different projects. We could easily add adapters for Plausible etc.
How do we track specific events?
data-analytics="{ "action": "share", "url": "..." }"
which the provider can access using event.target.dataset.analytics
.CustomEvent
with data (like { "action": "share", "url": "..." }
). This means all components that want something to be tracked, need to their own <script>
. Using events means there's a loose coupling.import
) shared analytics helpers in a client-side <script>
. This is similar to the CustomEvent
setup except that there's a tight coupling and no provider required as a global listener.<Analytics track={ event: 'click', data: 'play' }><VideoComponent /></Analytics>
.
User story
As a Marketer, I want to track the success of my campaigns.
Checklist