-
Notifications
You must be signed in to change notification settings - Fork 295
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 No Audiences Banner and Info Notice #9496
Comments
Thank you for drafting the IB, @techanvil !
To confirm, shouldn't this be the other way around, i.e. Please confirm, thank you! |
Thanks for catching that @nfmohit! You are spot on, it should be the other way round. I've fixed the IB, back over to you! 🦅 👁 |
Thank you Tom! IB ✅ |
QA Update ✅Verified the GTM events as per the table in ACs and all are being triggered accordingly.
|
Feature Description
GA events should be added to keep track of interaction with the No Audiences Banner and Info Notice.
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.
no-longer-available: The user views the variant where their previous selection is not longer available
Implementation Brief
NoAudienceBanner
component inforwardRef()
so aref
can be passed to it, and add theref
to its top-level rendered element.NoAudienceBannerWidget
component:NoAudienceBanner
wrapped by thewithIntersectionObserver()
HOC, e.g.NoAudienceBannerWithIntersectionObserver
. Render this in place of the existingNoAudienceBanner
instance.label
for the GA event:no-longer-available
whendidSetAudiences
is true, otherwisenone-selected
.onInView
callback prop toNoAudienceBannerWithIntersectionObserver
. In the callback, calltrackEvent( '${viewContext}_audiences-no-audiences', 'view_banner', label )
.NoAudienceBanner
component:label
for the GA event:no-longer-available
whendidSetAudiences
is true, otherwisenone-selected
.onClick
handlers for the "Select groups" / "Select other groups"Link
instances:trackEvent( '${viewContext}_audiences-no-audiences', 'select_groups', label )
prior to the call tosetValue
. Chain the two calls using.finally()
.onClick
handler for the "You can deactivate this widget in Settings"Link
instance:trackEvent( '${viewContext}_audiences-no-audiences', 'change_settings', label )
prior to the call tonavigateTo
. Chain the two calls using.finally()
.InfoNotice
component inforwardRef()
so aref
can be passed to it, and add theref
to its top-level rendered element.InfoNoticeWidget
component:InfoNotice
wrapped by thewithIntersectionObserver()
HOC, e.g.InfoNoticeWithIntersectionObserver
. Render this in place of the existingInfoNotice
instance.label
for the GA events: one ofnew-visitors
,compare-metrics
,custom-audiences
,purchasers
,returning-visitors
,compare-new-returning
, orcompare-cities
, depending on the current notice to be displayed.onInView
callback prop toInfoNoticeWithIntersectionObserver
. In the callback, calltrackEvent( '${viewContext}_audiences-info-notice', 'view_notice', label )
.onDismiss()
callback:trackEvent( '${viewContext}_audiences-info-notice', 'dismiss_notice', label )
prior to the call todismissPrompt
. Chain the two calls using.finally()
.withIntersectionObserver()
to remove the point about removing the hook whenuseIntersection()
has been replaced. The HOC is a useful abstraction around a common pattern ofuseIntersection()
usage that we can keep for the longer term.Test Coverage
NoAudienceBanner
andNoAudienceBannerWidget
.QA Brief
audienceSegmentation
feature flag enabled, tracking enabled, and Analytics connected using a property which is out of the gathering data state.No Audiences Banner
no-longer-available
label:view_banner
event is tracked with the labelno-longer-available
as per the AC.select_groups
event is tracked with the labelno-longer-available
as per the AC.change_settings
event is tracked with the labelno-longer-available
as per the AC.none-selected
label:view_banner
event is tracked with the labelnone-selected
as per the AC.select_groups
event is tracked with the labelnone-selected
as per the AC.change_settings
event is tracked with the labelnone-selected
as per the AC.Info Notice
0
to6
inclusive forcount
in order to iterate through the sequence of Info Notice messages:view_notice
event is tracked with the correct label as per the AC.dismiss_notice
event is tracked with the correct label as per the AC.Changelog entry
The text was updated successfully, but these errors were encountered: