site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Implement TwG custom GA events for supporter wall banner notification

Open felixarntz opened this issue 3 years ago • 4 comments

GA events for the TwG supporter wall reminder banner notification should be implemented.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

For all of the following GA events, the event category should be {viewContext}_thank-with-google-supporter-wall-notification.

  • When the user sees the TwG supporter wall reminder banner notification, a custom GA event with name view_notification should be sent.
  • When they click on the primary CTA button in that notification, a custom GA event with name confirm_notification should be sent.
  • When they dismiss that notification, a custom GA event with name dismiss_notification should be sent.

Implementation Brief

  • Update ThankWithGoogleSupporterWallNotification as follows

action: view_notification

  • Call trackEvent with the attributes in the AC with a useMount (see SetupSuccessBannerNotification)

action: confirm_notification

  • Add an onCTAClick prop to the inner BannerNotification passing a function that calls trackEvent with the attributes in the AC (see CoreSiteBannerNotification)

action: dismiss_notification

  • Add an onDismiss prop to the inner BannerNotification passing a function that calls trackEvent with the attributes in the AC (see CoreSiteBannerNotification)

Test Coverage

  • No changes necessary

QA Brief

  • Setup Thank with Google using a VPN connected to the US region.
  • Do not add any supporter wall widgets.
  • Using the Google Analytics Debugger extension, ensure the view_notification GA event isn't triggered for the mainDashboard_thank-with-google-supporter-wall-notification category.
  • Within the database -> wp_options table, change the value of _transient_timeout_googlesitekit_thank_with_google_setup to the current timestamp.
  • Clear the session and refresh the Site Kit dashboard and ensure the view_notification event is triggered when the banner notification appears.
  • Click the Add Supporter Wall widget primary CTA and ensure the confirm_notification event is triggered.
  • Click the Maybe later secondary CTA and ensure the dismiss_notification event is triggered.

Changelog entry

  • Measure interactions with Thank with Google supporter wall banner notification.

felixarntz avatar Oct 17 '22 16:10 felixarntz

IB ✅

tofumatt avatar Oct 17 '22 22:10 tofumatt

QA Update: ⚠️

@hussain-t I'd like to run an observation by you.

When you set up TwG, the transient timestamp is 1666146812 which is 7 days from the setup. I change the time on my computer to after 7 days (also tried 8 days) in the future and I expect the banner to appear informing me to add a supporter wall widget. Nothing does appear though. I've also changed the timestamp in the Db and changed my computer time to be past this date and no banner appears.

Would you expect the banner to appear based on the scenario above?

When I change the transient to the current timestamp then the banner does appear and this passes the QAB.

Verified:

  • When Site Kit and TwG is initially set up the view_notification GA event isn't triggered for the mainDashboard_thank-with-google-supporter-wall-notification category.
  • Change the transient to the current timestamp and on refresh the Site Kit dashboard and ensure the view_notification event is triggered when the banner notification appears.
  • When I click the Add Supporter Wall widget primary CTA and ensure the confirm_notification event is triggered.
  • When I click the Maybe later secondary CTA and ensure the dismiss_notification event is triggered.
Screenshots

image image image image

wpdarren avatar Oct 19 '22 02:10 wpdarren

@wpdarren, parts of the QAB to display the banner were copied over from #5538 and modified. Sorry, it was a bit confusing. You will have to change the value of _transient_timeout_googlesitekit_thank_with_google_setup to the current timestamp (by default, it will be seven days from the TwG setup). We shouldn't change the value of _transient_googlesitekit_thank_with_google_setup. I have updated the QAB.

hussain-t avatar Oct 19 '22 05:10 hussain-t

QA Update: ✅

@hussain-t thanks for updating the QAB.

Verified:

  • When Site Kit and TwG is initially set up the view_notification GA event isn't triggered for the mainDashboard_thank-with-google-supporter-wall-notification category.
  • Change the transient to the current timestamp and on refresh the Site Kit dashboard and ensure the view_notification event is triggered when the banner notification appears.
  • When I click the Add Supporter Wall widget primary CTA and ensure the confirm_notification event is triggered.
  • When I click the Maybe later secondary CTA and ensure the dismiss_notification event is triggered.
Screenshots

image image image

wpdarren avatar Oct 19 '22 10:10 wpdarren