doublesecretagency / craft-viewcount

View Count plugin for Craft CMS
Other
6 stars 4 forks source link

FR: "currently viewing" #14

Open adrienne opened 3 years ago

adrienne commented 3 years ago

Is there some way to get a count of how many users are currently looking at an entry? The other main view count plugin does this but i don't want to use them because the code doesn't look nearly as solid or performant.

lindseydiloreto commented 3 years ago

Hmm, that's a great question.

Broadly speaking, "views" aren't treated as ongoing events... it's just a single ping to the system to register that the view happened at all. To keep track of an active viewing session, it would require a bit more JavaScript on the front-end.

It's hard to say if this FR fits in with the long-term plans of View Count, but I can keep it open until we eventually figure it out!

adrienne commented 3 years ago

@lindseydiloreto - honestly we probably don't need anything that advanced for this particular client, so i can probably just do a custom query against the table for "all the views in the last 2 minutes" 😆 but yeah, i think it'd be a nice enhancement.

The Other View Count Plugin has some nice widgets that my client would love, but i can probably get pretty close with a custom widget: https://io.24hoursmedia.com/assets/content/_screenshot/views-work-widgets.png