Implement Depositor Notifications
Opened this issue · 16 comments
Summary
BLOCKED until we have a conversation with the client.
The goal is to implement email notifications for some activities/trigers in the Hyku application. That include:
- Notifications to authors related to views and downloads of their works.
Acceptance Criteria
- Email notifications to author related to views and downloads of their works are set up
- (Jeremy here: the notifications of this bullet point are not handled in the "Implementation Way Finding" and require a different approach.)
Screenshots or Video
Testing Instructions
Notes
Spike results: #1005 (comment)
Implementation brainstorm: #1005 (comment)
Notes from Meeting with PITT/PALS
Topic: Notifications for Downloads and Views
Should we email Authors or depositors?
- Next phase: Email the actual author
- Expand contributor to represent an actual author. Ref British library's forms
- For now, we’ll email depositors.
Acceptance Criteria:
- Depositor should get a monthly email.
- Email aggregates the counts of downloads and views of the work(s) they've deposited.
How often?
- Ideally, Feature Parity with digital commons.
- Sends monthly round up of views and downloads to the depositor. (Or author)
Sample:
Dear Author,
You had 1 new download in December 2023 across your 2 papers in MUShare. Your current readership:26 Total Downloads
Visit My Dashboard Icon VISIT MY
DASHBOARDThese monthly reports are provided to you by bepress on behalf of MUShare. For questions, comments, or to add more content and increase your readership and visibility as an author, please contact your repository administrator:
Why do you want this feature?
- Makes them feel good about engaging with the platform
- Give them the "I did something and people noticed" dopamine hit
- Don’t need a call to action
- Don't worry about increasing engagement metric.
blocked by GA4, valkyrie work and email notifications rework
Google Analytics PR
@aahurford or @ndroark Should an email still be sent even if the depositor has received no new views or file downloads?
We are developing based off the provided sample:
Sample:
Dear Author,
You had 1 new download in December 2023 across your 2 papers in MUShare. Your current readership:26 Total Downloads
Visit My Dashboard Icon VISIT MY
DASHBOARDThese monthly reports are provided to you by bepress on behalf of MUShare. For questions, comments, or to add more content and increase your readership and visibility as an author, please contact your repository administrator:
@ShanaLMoore
To Do:
test if pals ga4 set up and working in staging.
For QA we will send a manual email to confirm it displays how we want and then will need to wait for the monthly email to confirm automation works
Blocked - find tenant with GA4 tracking in staging
TODO: Shana to Pair with Rob for setup instructions
Spike ticket is needed. What is supposed to read and increment the user counts?
rob's comment: the questions really are: are the events being captured. if yes, are the events being read from the API. if yes, are the events being cached correctly in the reports for display and use
QA RESULTS: ⚠️ PENDING
This appears to be working. Tested with THIS TENANT,
The email matches the details of the dashboard.
However, I am clicking around a bunch in another tenant. (demo tenant) It'll take about a day for the events to get tracked with GA4. Those stats and email should be different. right now it's kind of odd that the stats are the same.
DEMO profile
ADMIN DASHBOARD
The counts don't appear to be changing.
At the turn of the month, emails went out regardless if the count was zero. (they should only email when counts are > 0)
Additionally, emails had no tenants specified in some of the emails.
UPDATE: the tenant must have an application name filled in for the mail to reference
if it's empty, maybe reference the url/cname
TODOS:
- - Hyrax: content-id => content_id to track file download stats (Shana and LaRita) + submodule update
- samvera/hyrax#6897
- update hyrax gem in hyku (LaRita)
- - add fall backs for application name (Shana and LaRita)
- - don't send email if 0 (Shana and LaRita)
- - all download buttons needs 'file_download' as id for tracking (Shana and LaRita)
- missing from:
-
update knapsack submodule (LaRita)
-
- tenantmaintenancejob issue (Rob)
- re scheduling jobs issue - UserStatCollectionJob
QA RESULTS: ❌ NEEDS REWORK
tested on STAGING
Starting with the following stats. I will then click around and download a bunch of files today. I expect to see updated stats tomorrow. It takes 24 hrs for the tracking to update.
TESTED 4 DAYS LATER
Counts are the same
Today I noticed a change in the profile count, which indicates ga4 is working afterall:
In staging I ran DepositorEmailNotificationJob.perform_now
Next Day Results after clicking around/downloading things
side note
@orangewolf Could you please QA this ticket and make sure things are working as you expect? I'm not convinced this is working right.