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
282 stars 203 forks source link

Analytics Implementation for Health Care Experience - Questionnaire #22828

Closed mdewey closed 3 years ago

mdewey commented 3 years ago

Google Analytics Implementation

Description

Relevant slack thread for context: https://dsva.slack.com/archives/CBU0KDSB1/p1617721726370500

Sample Users when authentication is required do not put staging credentials in your va.gov-team ticket; store or reference them in a .md file in the va.gov-team-sensitive repository

-We are working through getting actual test users. Currently works with any test user.

Please leave the following blank

Acceptance Criteria

Definition of Done

laurensimpson14 commented 3 years ago

@jonwehausen See notes below. All changes are in the GTM workspace "22828 Health Care Experience - Questionnaire". I believe this is ready for QA.

Changing tabs: This is already being collected as event action (both Navigation - Tab Click - hcq-Completed and Navigation - Tab Click - hcq-To do) and can be seen in the prod GA property: https://analytics.google.com/analytics/web/#/report/content-event-events/a50123418w178298118p176884211/_u.date00=20210409&_u.date01=20210409&explorer-segmentExplorer.segmentId=analytics.eventAction&explorer-table.plotKeys=%5B%5D&explorer-table.filter=tab%20click/

Printing PDFs on the Questionnaire list page and confirmation page: I've created a new tag called EV - HCQ Print PDF that fires on a new trigger and is set to look for every time the _event matches hcq-pdf-printed. This will get stored in GA as an event with category = Interactions, action = Downloaded HCQ PDF, label = {{Event}} (hcq-pdf-printed).

I've seen this work in GTM debug for the list page, however I'm not sure how to test it on the confirmation page.

Loading Data from an API: I've updated the trigger CE - bam-(get.*|cards.*)|hcq.* to include ^hcq.* in the regex. I also updated the variable RegEx - Product API Calls - Event Action Lookup to look for any event with ^hcq.* and return Health Care Questionnaire.

This is another one that I'm not sure how to test.

jonwehausen commented 3 years ago

Review

Thanks for jumping on this @laurensimpson14, please see my notes below.

Primary Notes

QA Testing

Description of Interaction Data Layer Screenshot Test Status
Submission of health care questionnaire image image image ⚠️ DOES NOT PASS

@mdewey the --submission event is perfect, though we did not see a secondary hcq--submission-successful event as expected here and not sure we should also be seeing an additional sip-form-saved but realize that may have been an auto-fire. We would expect to see a --submission-failed event in the event of a failed submission.
Click to print hcq application from /confirmation page (used vets.gov.user+228@gmail.com) image ✔️ PASS - for hcq-pdf-printed event

Though we may want to consider adding in a failed event or error-key DL variable for when the download fails image

Other Recommendations / Things To Consider

jonwehausen commented 3 years ago

Shifting back to Stand By

mdewey commented 3 years ago

Hey Folks!

All great stuff so far, I want to sum up what I saw

Thank you all so much!

leahkeeler commented 3 years ago

Looks good guys - are we collecting 1) total time to complete 2) IF abandoned, what place in the funnel?

laurensimpson14 commented 3 years ago

Hi Everyone,

@jonwehausen I've made your above recommended changes within the GTM workspace (removed the EV - HCQ Print PDF tag, attached trigger of CE - HCQ Print PDF as secondary trigger to Event - Any File Downloaded, tweaked the product-based API calls tag to use ^hcq-questionnaires.*)

@leahkeeler Yes, we are collecting time to complete and abandons within the funnel. The time to complete metric and abandons metric aren't something that can be pulled through Google Analytics, they require us to write a query within BigQuery. We're trying to standardize that as part of our KPI dashboard standardization work, so you'll have visibility to both of these metrics.

@mdewey

mdewey commented 3 years ago

Thanks for the info @laurensimpson14!

Apart from the removal of the prefix, what other action items are needed from the team?

laurensimpson14 commented 3 years ago

@mdewey I think that's everything from your team.

@jonwehausen You QA'd this ticket a while back & I've updated the workspace since then with your recommended changes. Would you mind taking one more look before publishing?

Shifting this back to QA.

jonwehausen commented 3 years ago

QA Round 2

@mdewey Data layer has PASSED here, there are just remaining updates on our part for GTM we'll need to adjust.

Description of Interaction Data Layer Screenshot Tag Screenshot Data Layer Test Status GTM Tagging Test Status
Click on "Completed" tab image image ✔️ PASS ✔️ PASS
Click on the "To Do" tab image image ✔️ PASS ✔️ PASS
HCQ questionnaires loaded image image ✔️ PASS ✔️ PASS
Click to print "View and print questions" button (successful render of the pdf) image N/A ✔️ PASS ⚠️ DOES NOT PASS
Submission of the health care questionnaire image N/A ✔️ PASS ⚠️ DOES NOT PASS
Successful submission of the health care application image N/A ✔️ PASS ⚠️ DOES NOT PASS

@laurensimpson14 Please see test status above -- we're going to need to make the necessary tag adjustments according to the test status above

laurensimpson14 commented 3 years ago

@jonwehausen I've tweaked those DL items and added in an exclusion query parameter for id in GA.

jonwehausen commented 3 years ago

Final QA

Test User: va.api.user+idme.101@gmail.com

Description of Interaction Tag Screenshot GTM Tagging Test Status
Click to print "View and print questions" button (successful render of the pdf) image ✔️ PASS
Submission of the health care questionnaire image ✔️ PASS
Successful submission of the health care application image ✔️ PASS
Failed submission of the health care application image ✔️ PASS
Validation failed image ✔️ PASS

Other Tests

jonwehausen commented 3 years ago

@mdewey GTM tagging QA has been completed and passed. Ticket being closed.