-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GA event tracking for the Audiences Tiles (excluding the "Top content" metric area) #9494
Comments
IB ✅ |
QA Update ⚠Couple of questions: ITEM 1: ITEM 2: |
Hi @kelvinballoo! To answer your q's:
|
QA Update ✅All the events are firing as expected.
|
Feature Description
GA events should be added to keep track of interaction with Audience Tiles (barring the "Top content" metric area which will be addressed separately).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The following GA events should be tracked for the given actions. See the GA events sheet.
Implementation Brief
AudienceTileError
component to be a module with its own folder and anindex.js
file.AudienceTileError
component to a new component e.g.TileErrorContent
.TileErrorContent
component inforwardRef()
so aref
can be passed to it, and add theref
to its top-level rendered element.onRetry
prop of typePropTypes.func
toTileErrorContent
, and pass it through toReportErrorActions
.AudienceTileError
component:audienceSlug
prop of typePropTypes.string
.TileErrorContent
wrapped by thewithIntersectionObserver()
HOC, e.g.TileErrorContentWithIntersectionObserver
. Render this in place of the existingTileErrorContent
instance.onInView
callback prop toTileErrorContentWithIntersectionObserver
:insufficient_permissions_error
for an insufficient permissions error, ordata_loading_error
for any other error.trackEvent( '${viewContext}_audiences-tile', action, audienceSlug )
.onRetry
callback prop toTileErrorContent
:insufficient_permissions_error_request_access
for an insufficient permissions error, ordata_loading_error_retry
for any other error.trackEvent( '${viewContext}_audiences-tile', action, audienceSlug )
.onOpen
prop of typePropTypes.func
to both theInfoTooltip
andTooltip
components. Pass the prop through fromInfoTooltip
toTooltip
toMuiTooltip
.onTooltipOpen
prop of typePropTypes.func
to theBadgeWithTooltip
component. Pass the prop through as theonOpen
prop toInfoTooltip
.AudienceTile
component:audienceSlug
prop of typePropTypes.string
and pass it through to theAudienceTilePagesMetric
component.onOpen
callback prop toInfoTooltip
. In the callback, calltrackEvent( '${viewContext}_audiences-tile', 'view_tile_tooltip', audienceSlug )
.onTooltipOpen
callback prop toBadgeWithTooltip
. In the callback, calltrackEvent( '${viewContext}_audiences-tile', 'view_tile_partial_data_tooltip', audienceSlug )
.AudienceTilePagesMetric
component:audienceSlug
prop of typePropTypes.string
.onTooltipOpen
callback prop toBadgeWithTooltip
. In the callback, calltrackEvent( '${viewContext}_audiences-tile', 'view_top_content_partial_data_tooltip', audienceSlug )
.AudienceTiles
component:audienceSlug
prop to theAudienceTile
andAudienceTileError
components with the value of theaudienceSlug
constant.AudienceTileZeroData
component. MakeAudienceTileZeroData
a module with its ownindex.js
file and create another component,TileZeroDataContent
in the module folder.AudienceTile
component to the newTileZeroDataContent
component.TileZeroDataContent
component inforwardRef()
so aref
can be passed to it, and add theref
to its top-level rendered element.AudienceTileZeroData
component:audienceSlug
prop of typePropTypes.string
.TileZeroDataContent
wrapped by thewithIntersectionObserver()
HOC, e.g.TileZeroDataContentWithIntersectionObserver
. Render theTileZeroDataContentWithIntersectionObserver
component.onInView
callback prop toTileZeroDataContentWithIntersectionObserver
. In the callback, calltrackEvent( '${viewContext}_audiences-tile', 'view_tile_collecting_data', audienceSlug )
.handleHideTile()
callback:trackEvent( '${viewContext}_audiences-tile', 'temporarily_hide', audienceSlug )
, followed byonHideTile()
. Chain the two calls using.finally()
.onHideTile
withhandleHideTile
as the value for theonHideTile
prop that is passed toTileZeroDataContentWithIntersectionObserver
.AudienceSegmentationErrorWidget
component to be a module with its own folder and anindex.js
file.AudienceSegmentationErrorWidget
component to a new component e.g.ErrorWidgetContent
.ErrorWidgetContent
component inforwardRef()
so aref
can be passed to it, and add theref
to its top-level rendered element.AudienceSegmentationErrorWidget
component:ErrorWidgetContent
wrapped by thewithIntersectionObserver()
HOC, e.g.ErrorWidgetContentWithIntersectionObserver
. Render this in place of the existingErrorWidgetContent
instance.onInView
callback prop toErrorWidgetContentWithIntersectionObserver
:insufficient_permissions_error
for an insufficient permissions error, ordata_loading_error
for any other error.trackEvent( '${viewContext}_audiences-all-tiles', action )
.handleRetry()
callback:insufficient_permissions_error_request_access
for an insufficient permissions error, ordata_loading_error_retry
for any other error.trackEvent( '${viewContext}_audiences-all-tiles', action )
prior to the calls tosetValue()
andonRetry()
. Chain the calls usingtrackEvent().finally()
.Test Coverage
QA Brief
audienceSegmentation
feature flag enabled, tracking enabled, and Analytics connected using a property which is out of the gathering data state.Error events
data_loading_error
event is tracked as per the AC for each of the error cases.data_loading_error_retry
event is tracked as per the AC.403
and the response payload to the following to show the insufficient permissions audience tile error and the insufficient permissions full width error.insufficient_permissions_error
event is tracked as per the AC for each of the error cases.insufficient_permissions_error_request_access
event is tracked as per the AC.Tooltip events
view_tile_tooltip
event is tracked as per the AC.view_tile_partial_data_tooltip
event is tracked as per the AC.view_top_content_partial_data_tooltip
event is tracked as per the AC."Collecting data" events
view_tile_collecting_data
event is tracked when the "Site Kit is collecting data for this group." tile variant is shown as per the AC.temporarily_hide
event is tracked as per the AC.Changelog entry
The text was updated successfully, but these errors were encountered: