DataBiosphere / data-browser

Apache License 2.0
11 stars 4 forks source link

[AnVIL DX] Validate custom events are accessible on the GA4 Query Explorer for the AnVIL Explorer dev and prod sites #4111

Closed MillenniumFalconMechanic closed 9 hours ago

MillenniumFalconMechanic commented 1 month ago

Need

Custom events are to be included in analytics reports.

Approach

Add a custom dimension in GA for every custom parameter specified in the following tags in Google Tag Manager:

  1. Validate GA4 Query Explorer access https://github.com/DataBiosphere/data-browser/issues/4118
  2. Inventory custom events https://github.com/DataBiosphere/findable-ui/issues/174
  3. Determine which custom events are and are not being propagated

This list may be incomplete, but fill it out from step 2 above.

Definition of Done

Every custom parameter is visible in the GA4 Query Explorer for AnVIL DX prod and staging:

AnVIL DX - GA4

AnVIL DX CC Staging - GA4

jpaten commented 2 weeks ago

Hi @MillenniumFalconMechanic~ I see each event except one on the analytics reports for "AnVIL DX - GA4", but no events appear for "AnVIL DX CC Staging - GA4". The exception is for bulk_download_requested, but I think that's because that event is only triggered on HCA, when the "Request curl command" button is clicked, so I didn't add it to the list. I also don't see any of the tags in the Tag Manager for anvilproject.org, but I do see them for data.humancellatlas.org. The tags I see for anvilproject.org are:

I can't find anything in the findable-ui repo for those tags, and they don't appear in GA4 reports, so I think I'm either missing something (access issues?) or they're not configured correctly. Let me know what the next steps are!

jpaten commented 2 weeks ago

All the tags seem to be present on the tag manager for https://explore.anvilproject.org as well! I don't see a tag manager account for the staging site though

MillenniumFalconMechanic commented 2 weeks ago

Brilliant, thanks @jpaten!

I don't see a tag manager account for the staging site though

For AnVIL, staging and prod share the same GTM container, and use the lookup - measurement ID by hostname variable to determine which GA data stream to forward events to.

but no events appear for "AnVIL DX CC Staging - GA4"

Thank you for spotting this! I have updated the lookup - measurement ID by hostname variable to use the correct staging hostname.

Next Steps

For the four Findable custom events that currently exist in the AnVIL Explorer GTM container, can you confirm if all parameters (as specified in the README) are available in the GA4 Query Explorer for both staging and prod? Document the parameters in the description above with checkboxes to indicate if they are currently available in the Query Explorer (I have added checkboxes to entity_selected as an example).

jpaten commented 1 week ago

Right now none of the variables show up in the Query Explorer, because they're not added as dimensions in the GA4 admin panel! I think they're all properly configured as variables in GA4, but we can't query them unless they're added as dimensions. I slacked you some information about how to add them as dimensions, it looks very straightforward!

jpaten commented 9 hours ago

Hi @MillenniumFalconMechanic! The Query Explorer is showing all custom events as visible with all the correct variables on both Staging and Prod. Let me know if there's anything else you want me to do, otherwise I think it's safe to close this ticket!

MillenniumFalconMechanic commented 9 hours ago

Thank you @jpaten!