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

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
79 stars 59 forks source link

FE: Implement Datadog RUM javascript on Benefit Hubs #15636

Open wesrowe opened 9 months ago

wesrowe commented 9 months ago

Description

User story

AS A Content/IA team member I WANT to use Datadog's RUM (Real User Monitoring) tools to get clearer visibility into how Veterans and other beneficiaries flow through the benefit hubs SO THAT I can change the hubs with confidence in the degree of impact.

Engineering notes / background

Teams on the authenticated side have implemented RUM already. Patrick Bateman has offered to share details if needed, but perhaps we can find the implementation code.

Datadog has documentation on implementation of the RUM javascript (snippet?).

Benfit hubs = the sections of the site under the megamenu's eleven top-level links.

image

Analytics considerations

Quality / testing notes

We need to be mindful of performance impact when we add this code for tracking.

Acceptance criteria

randimays commented 8 months ago

Example of Datadog RUM in the Appeals application

RUM on Datadog

Looks like we need to create an application in Datadog for the Benefit Hubs and then integrate some monitoring code in VW. At a glance, this doesn't look terribly complex. But we will need clarification on what exactly to monitor before pointing.

jilladams commented 8 months ago

Chatted w Randi about this in 1:1 today.

She flagged: Datadog is pulled into Vets-website pages via React. Hubs are content-build - no vets-website React widgets

Need to figure out how to pull Datadog / react into content-build, or if there’s another way Proposed reaching out to Tim / Ryan, to see if: a) they have concerns about React in C-b, since we'll migrate to Next / alternative ideas. Also maybe someone like Adrian Rollett who knows both datadog and content-build could have ideas, potentially.

WIll check on this in scrum. might end up blocked / at risk, but we could potentially work forward by adding a small react app to just the healthcare hub. Will need to keep an eye on perf either way.

randimays commented 8 months ago

Created a Slack thread to reach out to folks to see if there are any thoughts about creating a standalone React app to use in content-build, or if there are other ideas about how this might get done.

jilladams commented 8 months ago

@davidconlon FYSA: Adrian Rollet flagged that Datadog RUM may have cost implications for Platform as well. He suggested:

  1. We should develop an idea of how many pageviews will be involved and do a order of magnitude cost estimate, based on Datadog's pricing info. (We don't know if VA receives any discount.) 2.That we surface this to @DanielleThierryUSDSVA

I'm adding that to ACs, but please let us know if you have questions / concerns.

jilladams commented 8 months ago

@randimays I framed that as a cooperative exercise with PM, bc I think pageview counts will require Google Analytics access for now? Wes has that, but @FranECross won't quite yet. (I think that's blocked on Platform orientation.) So we may need to discuss that piece more to figure out how to answer those questions for price estimating.

randimays commented 8 months ago

@jilladams Do we need to complete this analysis before starting the RUM implementation, or am I good to move forward?

jilladams commented 8 months ago

good Q. I'm not sure - I think I need to ask DaveC. Maybe don't put pencils down just yet and I'll cc you?

jilladams commented 8 months ago

Ping to Dave re: $: https://dsva.slack.com/archives/C52CL1PKQ/p1697656838878859

jilladams commented 8 months ago

Marking blocked, moving out of sprint, unassigning Randi.

Dave Conlon has flagged that Platform is thin on materials budget. Increased cost as a result of this RUM application may not be sustainable, so we will need to figure out cost assessment before we advance the dev work. Cutting a ticket for that.

FYI @mnorthuis @DanielleThierryUSDSVA

jilladams commented 6 months ago

Some other documentation has arisen since we wrote up this ticket -- Rob Garrison (Ad Hoc FE on the Benefit Decision Reviews team) wrote this, so it's not definitive from a Platform perspective, but may be useful when we get around to implementing: https://github.com/department-of-veterans-affairs/va.gov-team/blob/master/platform/analytics/setup-real-user-monitoring.md