-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plausible custom event 'Create agendapoint' #286
Plausible custom event 'Create agendapoint' #286
Conversation
This uses the global configuration without any enabling or custom goals in the application. This might change in the future when automatic enabling is removed.
Using this hook, we can make sure the promise for enabling the analytics is finished, before continuing with the rest of the route. Something we cannot control in an initializer. The automatic enabling might be removed in the future, so we moved the code.
This custom event logs the event 'Create agendapoint' and it's template id and title. For this I added the used template as an argument to the onCreate action such that we can keep the Plausible code limited to controllers, routes and not burry that deep inside components.
Also, this PR is based on another PR where ember-plausible is introduced. See: #285 |
I get the reflex to include the id, but I don't think it has much value in the analytics tools to be honest |
@nvdk I thought I tried clicking on the Goal, but no 🤦 It indeed shows the properties. Including the id is for easier data processing later, but it shoud be one or the other, not both. I'll go ahead and remove the ID then. |
The template ID is rudimentary information if you also have the title. The title should be pretty much as unique of an identifier as the ID.
This PR includes the changes to post analytics about a custom event for creating an agendapoint and includes the template id and the title. I added the selected template as an argument to the onCreate action so that I could write the analytics code in the controller instead of the component.
The custom events could not be checked on the dashboard yet. I did not have access to the dashboard's configuration to inspect if the custom event's properties have correctly been logged. The public dashboard only shows the goal, so I know it works at least.