Tracking views?

Ok, I am using got off-label (if you will). I’m not a blog exactly, or maybe I am but I am a daily blog made up mostly of video content. I host much of my video content off-platform on AWS and embed it in each days post via HTML.

It’s all working well. However, much of my content is FITNESS and my users would really like to be able to track some information about workouts. So I am wondering, from a very high level a few things:

Question 1 Is there any way on ghost to know if a specific user has watched a specific video? Does ghost collect or can it be setup to collect that data. If I click on a post and go to the page an watch a video, is there ANY record anywhere that I watch that video?

Question 2: Even if the answer to question 1 is NO, can I serve page elements to specific users and not to others. Meaning if I do find a way to track workout views, can I have a BOOLEAN of some kind on the page that says “If USER A has seen this video, put a little green check mark by it” or some such thing?

Question 3: Can ghost retrieve data from outside the platform on a per user bases and integrate that into a post? So, for example, if I solve this tracking issue by doing something within AWS that lets me track users, can I maintain an external data base and can ghost check that DB to tell a user if they’ve done a workout, how many they’ve done, etc?

Not looking for actual code here, just someone smarter than me (which is most people) to help me sort through the logic of if this can be done and if it can what steps are needed.

Maybe look at Plausible or similar?

Not natively, no. But if you’re already embedding your videos with the HTML card, you could use this set up to a) check whether somebody is a member (untested, but a call to members/api/member/ should return the relevant data, if a user is logged in) and b) use your video player’s events (I think most of them have them) to write a “video view” into well…where ever you want.

If it’s fine that the information is only stored in the user’s browser, have a look into local storage. In that case you could probably omit the API call, but you wouldn’t be able to then say “Ohh, user XYZ has watched video ABC” from an analytics standoint.

You’d need to custom code it, but given my ideas from Question 1, it should be possible.

Ghost itself can’t do it – but a custom Javascript function you embed in the HTML card can. Only thing to keep in mind: any requests that are made to that external data source will be in the open. So don’t send any passwords, API keys, etc. around.

Overall, I don’t think it’s an impossible task. A cloud function on AWS could help you with most of it, but you’d need to figure out authentication against that cloud function etc.