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 200 forks source link

GA: recordEvent when `va-alert` loads on MHV landing page #68495

Closed wesrowe closed 4 months ago

wesrowe commented 11 months ago

Description

User story

As a Cartographers team member, I want to be able to segment GA data for users who see either the non-LOA3 or unregistered alerts, so that I can understand the frequency of this user type and see if their behavior differs significantly from other Veterans.

Notes

Example segmented GA report

Screenshot image

Possible tasks

Acceptance criteria

wesrowe commented 5 months ago

planning: if a piece of work for GA segmenetation is identified as big-effort and wasted/duplicated between GA360 and GA4, we can consider ticketing as future work to be done when the need is clearly imminent.

wesrowe commented 5 months ago

I overhauled the ticket, reducing ACs to just implementing the component-load event on va-alert – expect the points should come down.

wesrowe commented 5 months ago

@radavis, we have partial success in Staging. Here's what I see for User 3, who is not registered:

image

The bottom one is the "good" one that will correspond to Prod GA. The event action (ea) is just Navigation - Unknown.

I'm not exactly sure how it was supposed to appear. But per Jamie Stutt's comment I thought it would include the alert headline and status:

'event': 'nav-alert-box-load' 'action': 'load' 'alert-box-headline': //populate with the heading_1 'alert-box-status': //populate with the alert status, seems more like alert type - normally info, warning, continue

radavis commented 5 months ago

@wesrowe ~Nice.~ I'm currently looking for a loa1 account, but none are listed in the Test User Dashboard.

wesrowe commented 5 months ago

People often use their personal ID.me acct, if you have one that's not ID-proofed.

radavis commented 5 months ago

Waiting on OCTO-identity review.

radavis commented 4 months ago

@wesrowe According to the frontend support dashboard, changes in department-of-veterans-affairs/vets-website#29421 are now in dev, staging, and prod. Let me know when you have the chance to verify in GA.

wesrowe commented 4 months ago

@radavis, have you tried it in Staging? I'm still seeing the same Navigation - Unknown in adswerve. user 3

radavis commented 4 months ago

@wesrowe Ok, we will need to sync w/ the Analytics Team to get this sorted.

radavis commented 4 months ago

@wesrowe Could you provide a link to the analytics.google.com page you are viewing?

radavis commented 4 months ago

On May 3rd, 2024, the Analytics Team was able to change the GTM settings so that AdSwerve outputs Navigation - {heading content} for <va-alert /> components loading on our landing page.

There's still the problem of enabling this functionality for all <va-alert /> components. [discussion]

wesrowe commented 4 months ago

this looks perfecto on our "unregistered alert"!

image

and the non-LOA3 alert too!

image
wesrowe commented 4 months ago

@radavis, I believe I covered both use cases above. If you're satisfied, this can close.