Skip to content
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

Merged
merged 8 commits into from
Jun 10, 2022

Conversation

benjay10
Copy link
Contributor

@benjay10 benjay10 commented Jun 9, 2022

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.

“[BenJay10]” added 7 commits June 9, 2022 22:17
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.
@benjay10 benjay10 added the enhancement New feature or request label Jun 9, 2022
@benjay10
Copy link
Contributor Author

Also, this PR is based on another PR where ember-plausible is introduced. See: #285

@nvdk
Copy link
Member

nvdk commented Jun 10, 2022

image
can confirm it works at least. FYI, you can see the properties by clicking on the goal, I think that should also work in the shared URL.

@nvdk
Copy link
Member

nvdk commented Jun 10, 2022

I get the reflex to include the id, but I don't think it has much value in the analytics tools to be honest

@benjay10
Copy link
Contributor Author

@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.
@benjay10 benjay10 merged commit f948f9e into development Jun 10, 2022
@benjay10 benjay10 deleted the feature/plausible-event-create-agendapoint branch June 10, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants