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

Event based tracking #40

Closed
electerious opened this issue Sep 3, 2019 · 17 comments
Closed

Event based tracking #40

electerious opened this issue Sep 3, 2019 · 17 comments
Milestone

Comments

@electerious
Copy link
Owner

API and UI to allow event based tracking (e.g., button clicks). This is something planned for a later release once all the basics are done (#35)

@electerious
Copy link
Owner Author

Events are still planned. It's something I will focus on after v2: #129

@emschwartz
Copy link
Contributor

emschwartz commented Aug 15, 2020

I would find this extremely useful. Is there any way to help with this to speed up the development?

@electerious
Copy link
Owner Author

Here're some thoughts:

Ackee will get two new types of data: Event and Action.

An event is like a domain. You can add it in the settings of Ackee and it will be shown in the navigation as Events similar to Domains. There're three types of events (for the beginning):

  • Count occurrences: Will count how many times an event occurred. Those numbers will be grouped by day, month or year. It's similar to views.
  • Count item occurrences: Will count how many times an item occurred. It's similar to the pages. E.g. you send values like 'A', 'A', 'B' and it will show that 'A' occurred two times and 'B' only once.
  • Log: Allows you to log stuff like errors. Supports a shortValue and longValue. shortValue will show up in the list and longValue when you click on it.

An action is basically like a record. It's the entry you create for an event. Here's how it could look in ackee-tracker:

  • .action(eventId, 0)

  • .action(eventId, 1)

  • .action(eventId, 0, 'A')

  • .action(eventId, 1, 'B')

  • .action(eventId, 'short', 'long')

  • .action(eventId, 'short', 'long')

  • .updateAction(actionId, 0)

  • .updateAction(actionId, 1)

  • .updateAction(actionId, 0, 'A')

  • .updateAction(actionId, 1, 'B')

  • .updateAction(actionId, 'short', 'long')

  • .updateAction(actionId, 'short', 'long')

@emschwartz Could work well along with a .updateRecord function.

@emschwartz
Copy link
Contributor

This sounds great! Let me know if you could use any help or a beta tester

@emschwartz
Copy link
Contributor

Hey @electerious, any progress on this? Let me know if there's any way for me to help get this feature launched

@electerious
Copy link
Owner Author

No news for now. I'm currently focusing on the website and stuff around Ackee, but this feature should be the next big thing as soon as I'm back working on Ackee :)

@BetaHuhn
Copy link
Contributor

@electerious what's the time frame for this i.e. when will you start working on it? I'd love to help anyway I can, as this is something that would be very useful to me too!

@electerious
Copy link
Owner Author

electerious commented Oct 18, 2020

The plan right now is:

v2.5 => Events
v2.6 => Probably a better dashboard

Might start with events today 👀

electerious added a commit that referenced this issue Oct 18, 2020
electerious added a commit that referenced this issue Oct 18, 2020
@electerious
Copy link
Owner Author

Update: I'm currently refactoring a few parts of the UI, because the old implementation wasn't good at handling different kinds of widgets in a view. That's something we need as events can be displayed as charts and lists, depending on what the user specified in the settings. The good thing is that it allows me to remove tons of redundant code. The old state management was done with a REST API in mind, not with a GraphQL API. Will continue with the events once this showstopper is resolved.

@electerious
Copy link
Owner Author

I'm done refactoring the front-end. It's now possible to display multiple types of widgets. I can therefore continue to work on events :)

@electerious
Copy link
Owner Author

Weekly development update: The events are now in the UI. You can add, edit and delete events and change the display type (more on that once it's done). I'm currently updating ackee-tracker to include the new .action and .updateAction functions.

@electerious electerious added this to the v3.0.0 milestone Dec 26, 2020
@electerious
Copy link
Owner Author

ackee-tracker is ready for events. You can take a sneak peak at the upcoming changelog: https://github.com/electerious/ackee-tracker/blob/feature/events/CHANGELOG.md#unreleased-events

Planning to release this in January as v3 along with some other features.

As always: It's a lot of work and I'm happy about every sponsor: https://github.com/sponsors/electerious

@electerious
Copy link
Owner Author

v3 is now on the develop branch and ready for testing. It includes the newest beta of ackee-track. You can find everything you need to know in the changelog and in the events documentation:

https://github.com/electerious/Ackee/blob/develop/CHANGELOG.md#unreleased
https://github.com/electerious/Ackee/blob/develop/docs/Events.md

I've also added the ability to show average values (e.g. adding an action with a value of 10 and one with the value of 20 will show 15 in the UI. This could be helpful to measure the performance of sites: #207)

Feedback is welcome!

@BetaHuhn
Copy link
Contributor

BetaHuhn commented Jan 11, 2021

I just tried the new version and its incredible how much faster it feels, especially the installation part!

One thing I noticed is that in the API documentation for events, the example in the get-events section doesn't work.

It is missing the EventChartType
query getEvents {
	events {
		id
		title
		statistics {
-		        chart(interval: DAILY) {
+                       chart(interval: DAILY, type:TOTAL) {
				id
				count
			}
-                       list(sorting: TOP) {
+		        list(sorting: TOP, type:TOTAL) {
				id
				count
			}
		}
	}
}

A few other things:

  • In the documentation for events it is mentioned that the charts event types can display data for 'Each day, month or year (depending on the chosen interval)'. But in the UI there's no way to change the interval like there's with other metrics.

  • I also saw myself constantly having to navigate to the settings page to change the chart type from total to average. Why not add an option to change how events are displayed right from the events page? To my understanding the API handles every event type the same way, so I see no problem in changing the event type depending on what I want to see right now instead of when creating the event. For some use cases it might be helpful to see both charts and lists, so moving the event type option from the settings page to the events directly would make more sense.

Other than that the new version is awesome. I already have so many ideas for events (might be cool to have a page where we can share them)! Thanks for your hard work @electerious 🙏🎉

@electerious
Copy link
Owner Author

electerious commented Jan 12, 2021

@BetaHuhn

Thanks letting me know! I've fixed the docs.

In the documentation for events it is mentioned that the charts event types can display data for 'Each day, month or year (depending on the chosen interval)'. But in the UI there's no way to change the interval like there's with other metrics.

Totally forgot that. I will add the missing filter for the event page.

I also saw myself constantly having to navigate to the settings page to change the chart type from total to average. Why not add an option to change how events are displayed right from the events page? To my understanding the API handles every event type the same way, so I see no problem in changing the event type depending on what I want to see right now instead of when creating the event. For some use cases it might be helpful to see both charts and lists, so moving the event type option from the settings page to the events directly would make more sense.

The problem is that it's currently only possible to set filters globally. It's not possible to adjust a filter for a dedicated widget, but that's something I've in mind and should be changed in an upcoming version. It's also the reason why it's not possible to adjust intervals or sorting on the overview and domain pages. It's possible with the API, but I also need to add it to the UI. This also solves the event type dilemma and would allow us to remove them at all (right now they only define what the UI should show).

Other than that the new version is awesome. I already have so many ideas for events (might be cool to have a page where we can share them)! Thanks for your hard work @electerious 🙏🎉

Can't wait to see what people do with it. Here's a free idea (😃): GitHub can run scripts in a defined interval via GitHub actions. It would be possible to send reports to Ackee (e.g. GitHub stats, Twitter or Instagram followers, website response times (ping)).

@BetaHuhn
Copy link
Contributor

GitHub can run scripts in a defined interval via GitHub actions. It would be possible to send reports to Ackee (e.g. GitHub stats, Twitter or Instagram followers, website response times (ping)).

That's a great idea! I will definitely try this when v3 is out.

I had the idea to track uncaught JavaScript errors which are thrown. Using window.onerror you could catch any error that occurs on a page and send the error message to Ackee as an event.

@electerious
Copy link
Owner Author

It's live ✅

I guess there're still things we can improve. Feedback and suggestions are always welcome. Either in new issues or in the community chat: https://gitter.im/electerious-Ackee/community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants