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

[Spike] Metrics in GA4 and RUM for Location page #85722

Closed melissa-lefevre closed 1 week ago

melissa-lefevre commented 4 months ago

Background/Request

VA Online Scheduling allows Veterans who are logged into VA.gov to schedule and manage their appointments.

The VAOS team released a feature for users to search facilities by recent locations. The "Sort by" field will default to "recent locations" in order to surface relevant facilities for Veterans and limit the amount of searching through irrelevant options.

Goal

Track whether the default "Sort by" field is changed from "Recent locations" to a different option by users along with time on page.

Requirements to Consider


Tasks

In GA4 and, where applicable RUM, track:

Time Box

_ hours

Definition of Done


How to configure this issue

Bren22va commented 2 months ago

Hey team! Please add your planning poker estimate with Zenhub @cferris32 @jenniemc @JunTaoLuo @ryanshaw @simiadebowale @vbahinwillit

Bren22va commented 2 months ago

Melissa to update to reflect GA instead of Data Dog

melissa-lefevre commented 2 months ago

I updated the ticket to use GA4 and RUM instead of Data Dog.

jenniemc commented 2 weeks ago

@melissa-lefevre , Can you please clarify the second task question?

jenniemc commented 2 weeks ago

Q: The amount of time on page before and after implementing the change.

A: Presently we do not track the amount of time users spend on the facility selection page. Upon addition of “recent location” sort option we can add a GA4 tracker for time spent on the facility page.

Q: If the user does change the drop down from "recent locations", what are they changing it to?

A: We can record the final sort type selected when user clicks the continue button. In addition, we can also include how much time the user spends on the facility page.

Suggested GA4 event name: "vaos-facility-[sortMethod]-selected" accompanying name: "seconds-spent-on-facility-page"

melissa-lefevre commented 1 week ago

@jenniemc to clarify

If the "Sort by Recent locations" is being clicked on to change the default from "Sort by Recent locations" to something else.

What I am looking for is if the user changes the default (sort by recent locations) to somethign else. You answer this in your following comment.

We can record the final sort type selected when user clicks the continue button. In addition, we can also include how much time the user spends on the facility page.

That is perfect. I just need to know 1. How many users changing the drop down to something else and 2. What are they changing it to?

jenniemc commented 1 week ago
  1. How many users changing the drop down to something else

We cannot track the number of users. However, in Goggle analytic tool, you can tally up the event name vaos-facility-recentLocation-selected for example, and see how many times it comes per day

jenniemc commented 1 week ago

Technical Notes: Upon submit on the component VAFacilityV2

  1. Update the component to record sortMethod. Suggested GA4 event name: "vaos-facility-[sortMethod]-selected"
  2. Calculate how long a user stayed on the page. Suggested name: "seconds-spent-on-facility-page"

Example of recording multiple data under one event name.

ldelacosta commented 1 week ago

No additional details are needed. Closing out the ticket.