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

Initial events implementation #215

Open
wants to merge 1 commit into
base: master
from
Open

Initial events implementation #215

wants to merge 1 commit into from

Conversation

@arp242
Copy link
Collaborator

arp242 commented Mar 26, 2020

Add code to count.js to send events on click.

Also don't count events in the various statistics; I'll add a separate
UI for this later (instead of showing "pages" you can show "events" or
"foo event"). This needs some work, and I'll probably do that sometime
after the unique pageviews is done, since that also modifies the same
code (and is more important).

@arp242

This comment has been minimized.

Copy link
Collaborator Author

arp242 commented Mar 26, 2020

What do you think of this @CanRau? Wondering if this works for you, or if you need something else or more?

Add code to count.js to send events on click.

Also don't count events in the various statistics; I'll add a separate
UI for this later (instead of showing "pages" you can show "events" or
"foo event"). This needs some work, and I'll probably do that sometime
after the unique pageviews is done, since that also modifies the same
code (and is more important).
@arp242 arp242 force-pushed the events branch from 3c964a5 to b18f6a4 Mar 26, 2020
@CanRau

This comment has been minimized.

Copy link
Contributor

CanRau commented Mar 26, 2020

goatcounter.count({
  event: true,
  path: 'Path will be page path/url as normal',
  referral: 'referral will be event name',
})

So referral will be the event name right?
Yea I think that works once it's handled in the UI (no pressure though) 😉

I've already integrated get_query in gatsby-plugin-goatcounter, didn't manage to answer your last mail though, sorry 😅

@arp242

This comment has been minimized.

Copy link
Collaborator Author

arp242 commented Mar 26, 2020

Right now the path is the event name (which is not a very clear name, but we're kind of stuck with that now). The referral is the referral as usual.

I didn't think the path would still be useful?

@CanRau

This comment has been minimized.

Copy link
Contributor

CanRau commented Mar 26, 2020

Uh yea, sure, besides the initially slightly confusing naming I'm totally fine with it and the gatsby plugin would hide that anyway like the data-attributes 🤷‍♂
👍

@arp242

This comment has been minimized.

Copy link
Collaborator Author

arp242 commented Mar 27, 2020

Yeah, it's a bit confusing; in hindsight I should have used name instead of path, but hard to change now. I can use name and then fall back to path if it doesn't exist, but not sure if that would really help, especially since the parameter sent to the /count endpoint would still be named p for path. I'll see if I can make the doc a bit clearer on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.