google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 290 forks source link

Include Conversion Event Providers And Their Events in Debug Data #8530

Closed zutigrm closed 5 months ago

zutigrm commented 6 months ago

Feature Description

Update Google\Site_Kit\Core\Site_Health\Debug_Data class to include active conversion event providers and their events that are tracked by Site Kit. See implementation and class design in the design doc.


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

eugene-manuilov commented 6 months ago

@zutigrm, in analogy to what we discussed in another ticket, it would be nice to make AC be implementation agnostic. Basically, when we write AC it should always answer the What will we get? question, whilst IB will answer for the How will we do it? question.

Debug_Data class should be updated to include new get_active_conversion_event_provider_fields method which would retrieve

This ^ tells exactly what we need to do to get the final result, which is more IB-ish information and shouldn't be in the AC section. Much better would be if we write AC that has the following:

* Site Health information displays active conversion event providers and their events that are tracked by Site Kit.

This ^ is the ideal AC for this task and it will be the responsibility of the IB writer to figure out which class to update. In order to help them figure out it, we can add a note in the IB section pointing to the correct section of the design doc, so they can find which class to update and which method name to create.

Could you please adjust your AC? Thanks in advance.

zutigrm commented 6 months ago

@eugene-manuilov Thanks, that's pretty helpful. Since it is about infrastructure I though I should still include a minimal description. I will follow the What will we get? as a guideline.

AC updated

eugene-manuilov commented 6 months ago

Thanks, @zutigrm. AC ✔️

eugene-manuilov commented 6 months ago

@zutigrm

  • It should retrieve event names from active conversion event providers as a mapped array with their names/slugs as keys and event names as values.

How? What do we need to do to get that information?

zutigrm commented 6 months ago

@eugene-manuilov sorry about that. Expanded on the specifics.

eugene-manuilov commented 6 months ago

Thanks. IB ✔️

mohitwp commented 5 months ago

QA Update ⚠️

@jimmymadon Just want to confirm currently new added field "Active conversion event providers" also appears when 'conversionInfra:' feature flag is not enabled. No instructions are provided under QAB related to it but just want to reconfirm that changes introuduced under this tickets are not behind feature flag.

image

_Verified that when OptinMonster Plugin is not activate new field is added for "Active conversion event providers" appears with no value (i.e. None)._ ![image](https://github.com/google/site-kit-wp/assets/94359491/7b5bd731-3ac7-4fc8-8742-cd8d9b96a5f6) _Verified that when OptinMonster plugin is active. a value does appear showing the event name for this plugin, i.e. submit_lead_form._ ![image](https://github.com/google/site-kit-wp/assets/94359491/c0c20377-ad15-400b-9efb-1117c9aa5eb4)
mohitwp commented 5 months ago

As discussed on slack with @jimmymadon . Changes introduced under this PR should be behind feature flag. Moving this back to execution.

mohitwp commented 5 months ago

QA Update ✅

_Verified that when OptinMonster plugin is active. a value does appear showing the event name for this plugin, i.e. submit_lead_form._ ![image](https://github.com/google/site-kit-wp/assets/94359491/5fd8496e-a773-4688-ad22-277fd88d235b) _Verified that when OptinMonster Plugin is not activate new field is added for "Active conversion event providers" appears with no value (i.e. None)._ ![image](https://github.com/google/site-kit-wp/assets/94359491/4bb0a9a4-7a11-4864-818b-266508eaa6f2) https://github.com/google/site-kit-wp/assets/94359491/3beb0792-e97f-4ddd-8bdf-5e484c1ca883