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 Pre-Need Application #60073

Closed ccruzgra closed 1 year ago

ccruzgra commented 1 year ago

Google Analytics Implementation or QA Request

What this form is for

The Pre-Need application is used by service members, Veterans, family members, and representatives to determine an applicant's eligibility for burial at a VA national cemetery.

Use this template to request Google Analytics implementation or QA for your product. Please fill out all brackets.

> _Please see the following information for implementation timeline:_ > New Teams: Implementation will usually be completed in 4 sprints > > - Sprint 1: Discovery/Orientation > - Sprint 2: FE Implementation > - Sprint 3: Tagging Implementation > - Sprint 4: QA > > All other teams: Implementation will usually be completed in 2 sprints > > - Sprint 1: Discovery and FE Implementation > - Sprint 2: Tagging Implementation and QA

Description

Required

We would like for the following items to be tracked in Google Analytics:

- How many users are selecting applicant name vs. “Someone else” options for preparer page question regarding who is filling out the application?
    - [Step 5 of 6: Contact Information](https://www.va.gov/burials-and-memorials/pre-need/form-10007-apply-for-eligibility/preparer)
    - [Step 6 of 7: Contact Information](https://www.va.gov/burials-and-memorials/pre-need/form-10007-apply-for-eligibility/preparer)

- Total number of users per user status selected (Veteran / service member, spouse or surviving spouse, unmarried adult child, other) based on "Relationship to Veteran" field radio button question in Applicant Information step)
    - [Step 1 of 7: Applicant Information](https://www.va.gov/burials-and-memorials/pre-need/form-10007-apply-for-eligibility/applicant-information).

Optional

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.

michelle-dooley commented 1 year ago

Thank you for your submission. We will review and get back to you with ETA.

ccruzgra commented 1 year ago

Hi @michelle-dooley Is it possible to get an estimate on ETA for this? Thank you.

jestutt commented 1 year ago

@ccruzgra To see those radio button events in GA you need to use the 'event': 'int-radio-button-option-click'

Here is the data layer code to use: https://user-images.githubusercontent.com/93597659/237757966-63508e18-a4e1-4904-b4fe-7c932b181ed3.png

Note: for the label on the Contact Information on the Preparer page, you want to capture relationship -- e.g. self -- or some other label, not the name.

After you implement the code let me know and I will test.

jestutt commented 1 year ago

Hi @ccruzgra Checking to see i there's a status update on adding the radio button events.

ccruzgra commented 1 year ago

@ccruzgra We will get back to you as soon as we've consulted our devs. Thank you.

ccruzgra commented 1 year ago

@jestutt Our tech lead checked, and it appears the code is already implemented into the data layer. Are you able to test? cc: @ksantiagoBAH for awareness.

Screenshot 2023-09-06 at 9 43 01 AM Screenshot 2023-09-06 at 9 44 27 AM

ccruzgra commented 1 year ago

@jestutt Touching base with you again to see if you were able to test. Thanks.

jestutt commented 1 year ago

@ccruzgra It's a little hard to explain but any events that you see in the inspect datalayer that start "gtm." are auto detect interactions that GTM adds, not the FE added datalayers events with specific variables that we want to collect like the one below for radio button event

237757966-63508e18-a4e1-4904-b4fe-7c932b181ed3

ccruzgra commented 1 year ago

@jestutt Gotcha. Thanks for the clarification.

@ksantiagoBAH Can you please assist with the above?

ksantiagoBAH commented 1 year ago

Is this what you are looking for? Screenshot 2023-09-15 at 9 29 38 AM

ccruzgra commented 1 year ago

@jestutt wanted to follow up on this to make sure you saw Kenny's question above

ccruzgra commented 1 year ago

@michelle-dooley Is there anyone else that can assist with this?

jestutt commented 1 year ago

@ccruzgra I did miss Kenny's question. Thank you!

@ksantiagoBAH We want the Event Actions to looks like this when captured in GA: Radio Button - {question} - {selected answer] - [required} Screenshot 2023-09-29 at 11 52 24 AM

For this question -- and any other radio button sets like it -- you want the legend label test for the question and the radio button label test for the selected answer.

Screenshot 2023-09-29 at 11 41 26 AM Screenshot 2023-09-29 at 11 41 15 AM

This question -- Who is filling out this appliction? -- is a special scenario in that we do not want to capture a name as that's PII. Instead, I would suggest using the values for radio buttons of "Self" and "Authorized Agent/Rep".

Screenshot 2023-09-29 at 11 49 26 AM Screenshot 2023-09-29 at 11 49 03 AM
ksantiagoBAH commented 1 year ago

Sounds good I have to modify it a little to get it to work like that, thanks.

ccruzgra commented 1 year ago

@jestutt, @ksantiagoBAH confirmed his changes were merged. Are you able to test that everything looks good?

ccruzgra commented 1 year ago

@jestutt bumping this again

jestutt commented 1 year ago

@ksantiagoBAH I don't see any datalayer events when I interact with the "Relationship to service member" radio buttons on https://staging.va.gov/burials-and-memorials/pre-need/form-10007-apply-for-eligibility/applicant-relationship-to-vet

I do see it for the "Who is filling out this application?" radio button interactions and it looks right: Private Zenhub Image

Interestingly, if there's already a selection and I change it, 2 datalayer events fire - one for each radio option. It should only be the one being selected. Private Zenhub Image

cc @ccruzgra

ksantiagoBAH commented 1 year ago

@jestutt Let me take a look

AlexanderSherrow commented 1 year ago

Issue should be fixed and is ready for review.

jestutt commented 1 year ago

@AlexanderSherrow @ksantiagoBAH @ccruzgra

I think we are good. Datalayer event fires as intended and you can see the test events that were sent to staging GA in the screenshot.

Screenshot 2023-10-30 at 6 54 10 PM Screenshot 2023-10-30 at 6 56 16 PM

ccruzgra commented 1 year ago

@jestutt Thanks for confirming that this is in place now!