department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Analytics Implementation or QA Support for Benefits Management Tools: CST: Subsequent Development Letters #92525

Closed jacobworrell closed 2 weeks ago

jacobworrell commented 2 months ago

Google Analytics Implementation Request

Please provide the following details for this request

Please leave the following blank

Acceptance criteria

Additional information

Please refer to Platform Collaboration Cycle or the Analytics Request Touchpoint on Platform website for more information about the Collaboration Cycle.

johnny-jesensky-adhoc commented 1 month ago

@jacobworrell -- can you please share another version of the spreadsheet. you referenced in this ticket? I'm unable to access.

We need to be able to track number of downloads over time by letter type, both by doc type ID and by the unique labels we have assigned, which can be found in this spreadsheet.

FYI @ChristineYoungZA, @Blivaditis

jacobworrell commented 1 month ago

Here is a more accessible version of the spreadsheet @johnny-jesensky-adhoc

CST - Letter Download Codes and names.xlsx

jstrothman commented 1 month ago

@johnny-jesensky-adhoc I gave you access on SharePoint to the CST Letter Codes and Downloads.xlsx so you can refer to the content source of truth for this work. (No changes have been made since Jacob uploaded a copy to this ticket.)

The column with the name we'd like to use in GA is titled: GA event name -- not that it should be the name of the event -- but it's the text string we want to track when the pdf links are clicked

jestutt commented 1 month ago

@jstrothman This request is about adding the letter type to the claim-letter-download event right? We don't need the spreadsheet for that. Instead, letter-type needs to be added as a variable to the the existing custom dataLayer push event.

event: "claim-letters-download",
gtm.element.textContent: "Download Claim Letter (PDF)",
gtm.elementUrl: "https://staging-api.va.gov/v0/claim_letters/[858]:id.pdf"
letter-type: // letter type 

Once it's ready on staging, we can make sure that GTM is seeing the new variable and show you where it will show up in GA.

cc @johnny-jesensky-adhoc @jacobworrell

jstrothman commented 1 month ago

@jestutt That matches what we discussed -- that we'd identify what we wanted to track and put in a request so you all could verify best approach. The Benefits Management Tools team adding in our code the variable letter-type with the value of the text string (friendly name for the letter) sounds perfect. Thank you

samcoforma commented 1 month ago

@jestutt Hi Jamie,

I'm adding the letter-type field to our GA event logging code right now, and wanted to confirm that the value for this should simply be the doctype of the letter, and that you'd be mapping these into the friendly short names on the GA side (for reference: https://github.com/department-of-veterans-affairs/va.gov-team/issues/92394#issuecomment-2338657245 ).

For example, the value I'd send for letter-type would be the doctype id (859) instead of short name (Specific evidence request). Correct?

cc: @jstrothman @jacobworrell

johnny-jesensky-adhoc commented 1 month ago

@samcoforma -- Confirming I'm seeing this comment. Jamie is OOO for the next couple of days -- but will have intermittent availability later in the week (starting Wed).

She is going to be the best person to answer this, so I'll flag this for her when she's back.

FYI @jestutt, @jstrothman

jestutt commented 1 month ago

@samcoforma Whether you're sending the doctype id or the short name is up to your team as they are the ones who will be using this data, so you probably want to talk to @jstrothman and @jacobworrell. I just tell you what parameter to add to your dataLayer and make sure it shows up in GA.

@johnny-jesensky-adhoc

jstrothman commented 1 month ago

Thank you @jestutt @samcoforma @jacobworrell Here's the user story I shared in Slack:

User story: As a product team member, I want to generate a single easily readable report that aggregates doc types in useful groupings with recognizable names so I can review and share letter download counts and trends and so I can assess later web activity for people who downloaded letters.

I'd like us to send the short name, not the doctype id: By passing a friendly name to a custom event parameter, we can create a single report usable by us and our stakeholders without needing to manipulate in cumbersome ways.

jacobworrell commented 3 weeks ago

@jestutt just echoing what @jstrothman said. I think a digestible snapshot based on the "short name" is preferable. Is it possible to get both views, though, one broken down by doc id and another by short name?

agreed the priority is short name in any case

jestutt commented 3 weeks ago

@jacobworrell There is one dimension in GA4 that you are passing this information into. It's up to your team what you'll send -- doc ID, short name or combination of the two -- but we will not be creating anything new on the GA side for this.

Something to consider is that the doc ID is passed thru as part of the Link URL so the information is already there if you need it in that form. (screenshot from Explore report).

Image

samcoforma commented 2 weeks ago

@jstrothman This has been merged, so short names should start being logged in production later today or tomorrow.