scientist-softserv / palni-palci

Other
1 stars 0 forks source link

Implement Depositor Notifications #1020

Open ShanaLMoore opened 5 months ago

ShanaLMoore commented 5 months ago

Summary

BLOCKED until we have a conversation with the client.

SOW

The goal is to implement email notifications for some activities/trigers in the Hyku application. That include:

Acceptance Criteria

Screenshots or Video

Testing Instructions

Notes

Spike results: https://github.com/scientist-softserv/palni-palci/issues/1005#issuecomment-2073611653 Implementation brainstorm: https://github.com/scientist-softserv/palni-palci/issues/1005#issuecomment-2078113101

ShanaLMoore commented 4 months ago

Notes from Meeting with PITT/PALS

Topic: Notifications for Downloads and Views

Should we email Authors or depositors?

Acceptance Criteria:

How often?

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 DASHBOARD

These 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?

jillpe commented 4 months ago

blocked by GA4, valkyrie work and email notifications rework

ShanaLMoore commented 4 months ago

Google Analytics PR

ShanaLMoore commented 4 months ago

@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 DASHBOARD

These 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:

aahurford commented 4 months ago

I think no.

On Fri, May 31, 2024, 11:08 AM Shana Moore @.***> wrote:

@aahurford https://github.com/aahurford Should an email still be sent even if the depositor has received no new views or file downloads?

We are developing based off the sample you provided: 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 DASHBOARD

These 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:

— Reply to this email directly, view it on GitHub https://github.com/scientist-softserv/palni-palci/issues/1020#issuecomment-2142747812, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4D4QCDE6VARVUEMJNBR4H3ZFC4CLAVCNFSM6AAAAABG26UAKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSG42DOOBRGI . You are receiving this because you were mentioned.Message ID: @.***>

jillpe commented 3 months ago

@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

ShanaLMoore commented 3 months ago

Blocked - find tenant with GA4 tracking in staging

TODO: Shana to Pair with Rob for setup instructions

ShanaLMoore commented 3 months ago

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

ShanaLMoore commented 1 month ago

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

Image

EMAIL

Image

ADMIN DASHBOARD

Image

ShanaLMoore commented 3 weeks ago

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.

Image

UPDATE: the tenant must have an application name filled in for the mail to reference

Image

if it's empty, maybe reference the url/cname

ShanaLMoore commented 3 weeks ago

TODOS:

Image

ShanaLMoore commented 3 weeks ago

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.

Image

TESTED 4 DAYS LATER

Counts are the same

Image

ShanaLMoore commented 2 weeks ago

Today I noticed a change in the profile count, which indicates ga4 is working afterall:

Image

In staging I ran DepositorEmailNotificationJob.perform_now

Image

Next Day Results after clicking around/downloading things

Image

side note

this was seen in adventist: Image

ShanaLMoore commented 1 week ago

@orangewolf Could you please QA this ticket and make sure things are working as you expect? I'm not convinced this is working right.

ShanaLMoore commented 1 week ago

I checked maildev today and was surprised to see 129+ new emails that were sent on sep 20th. (it's not a new month, why were they sent?)

Also, even though each tenant is different, they all say the same thing.

Image