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 for MHV Cartographers - MHV Secondary Nav #82201

Closed dcloud closed 4 months ago

dcloud commented 6 months ago

Google Analytics Implementation Request

Please provide the following details for this request

Clicks on the MHV Secondary Nav, per department-of-veterans-affairs/va.gov-team/issues/80654.

The MHV Secondary Nav is in the process of initial implementation: department-of-veterans-affairs/vets-website/pull/29424

We propose Navigation - MHV secondary nav - [link text] - [link url] as the custom event scheme.

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.

dcloud commented 6 months ago

@jestutt Our PM, @wesrowe, indicated you may have feedback on Navigation - scheme requests like this one.

Could you let us know if Navigation - MHV secondary nav - [link text] - [link url] the right direction or if that needs tweaking?

jestutt commented 6 months ago

@dcloud That looks like a GA UA taxonomy structure that would be created in GTM based on the variables in a dataLayer push event but I don't think that's what you're asking for. I think you want to share the dataLayer push event template for the custom event instead.

Please note that the GA4 implementation project is the priority right now and other requests will likely be delayed until we have made further progress on that front -- which will likely not be until end of June/early July.

cc @johnny-jesensky-adhoc

wesrowe commented 6 months ago

@jestutt, we would be happy to use a GA4 approach instead. We have a major release coming at the end of May and we need to get some GA instrumentation on it – and it sounds like we all prefer GA4.

We need help understanding how to do custom events in GA4. Can you share an example of the GA4 "dataLayer push event template for the custom event"? Since we're familiar with the Navigation taxonomy from UA, it would be nice if the example was from a Navigation component you've already migrated.

Hopefully that's clear – I might suggest slack as a quicker alternative otherwise.

jestutt commented 6 months ago

@wesrowe UA or GA4 would use the same dataLayer event to pass information thru to GA and a dataLayer event template looks like what I shared for the alert render request. I think what you're asking for instead is the template, not the Event Action schema from UA. Give me until the end of the week and I should have that for you.

@johnny-jesensky-adhoc

wesrowe commented 6 months ago

@jestutt, okay, hopefully it's clear what we need to get out of this template as you design it. I'm thinking there are those classic 4 pieces of info from UA events:

it could probably be done in fewer than 4 fields, e.g., maybe we could lose the category "Navigation".

dcloud commented 6 months ago

I think what you're asking for instead is the template, not the Event Action schema from UA. Give me until the end of the week and I should have that for you.

@jestutt I imagine you weren't able to get to this yet, but do you have an update? Thanks in advance

jestutt commented 6 months ago

@dcloud Thanks for checking in! Give me one more day. I want to make sure what I give you maps the same way as other nav tracking.

cc @johnny-jesensky-adhoc

jestutt commented 5 months ago

@dcloud Here's the dataLayer push event template for the new MHV nav:

'event': 'nav-mhv-secondary'  //feel free to change but share the final event name(s) with me so I can ensure the event is sent to GA 
'action': 'click'
'nav-link-text': //populate with the text of the link
'nav-link-url':  //populate with the destination URL
'nav-link-location': 'MHV secondary nav'  //using what you had in the ticket but change if you want something more descriptive

Let me know if there are any questions.

cc @johnny-jesensky-adhoc

dcloud commented 5 months ago

I think that all looks good. I've added the "template" in this part of my PR, no edits

wesrowe commented 5 months ago

@jestutt, fysa we implemented our piece in Staging but the event doesn't seem to be connecting to GA correctly yet. Here's AdSwerve:

image

Do you or @Blivaditis still need to do the GTM piece?

wesrowe commented 5 months ago

Bumping this post-holiday – @jestutt @johnny-jesensky-adhoc

jestutt commented 5 months ago

@wesrowe When you brought me this event, I mentioned that this would be a GA4 only event. You can see that the event name still catches one of the UA triggers but the information mapping is only being done in GA4. I'll have this one in place by Monday AM and will share how to find the information in the GA4 interface as the confirmation. Thanks for your patience.

@johnny-jesensky-adhoc

wesrowe commented 5 months ago

@jestutt, I understood it would be GA4-only. I realize my screenshot doesn't convey that understanding – sorry. Anyway... thanks for the Monday offer.

wesrowe commented 5 months ago

@jestutt, checking in – I didn't see a GA4 event just now in adswerve. Thanks!

cc @johnny-jesensky-adhoc

jestutt commented 4 months ago

@wesrowe The tracking for the new event has been published but I couldn't find the new menu on the staging site to test. Going to follow up in Slack for more info.

@johnny-jesensky-adhoc

wesrowe commented 4 months ago

I believe we stopped at "Jamie can see the new event in adswerve but for some reason Wes can't."

wesrowe commented 4 months ago

I found these events working as expected in GA4 Explore. I'll come to office hours if I continue to not be able to see this event in AdSwerve. Thank you!