Skip to content

Conversation

@daniloercoli
Copy link
Contributor

Add additional properties to gutenberg_enabled , and gutenberg_disabled analytics events:
The property source can now have the following values:

  • via-site-settings
  • on-block-post-open
  • on-site-creation

Test 1:

  • Flip the block editor setting in Site settings and make sure the property is added correctly

Test 2:

  • Create a new site, and make sure the property is added with the correct value
  • Tap on new post, and make sure nothing is tracked

Test 3:

  • Clear your editor settings on the web
  • Re-install the app
  • open a block based post
  • the popup should appear, and the correct property value bumped with analytics

cc @etoledom Since we need the iOS counterpart of this PR

Update release notes:

  • [ x ] If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

…ed analytics events:

The property `source` can now have the following values:
- via-site-settings
- on-block-post-open
- on-site-creation
@hypest
Copy link
Contributor

hypest commented Jul 30, 2019

Let's target the 13.0 release branch for this one and the WPiOS one when it gets opened? cc @etoledom and headsup @loremattei .

@daniloercoli
Copy link
Contributor Author

Let's target the 13.0 release branch for this one and the WPiOS one when it gets opened? cc @etoledom and headsup @loremattei .

I wanted to target 13.0 branch, but it's still not there :)

…ss-Android into add/analitycs-to-GB-editor-flip

* 'develop' of https://github.com/wordpress-mobile/WordPress-Android:
  Don't revert firebase test-targets change
  Don't revert EditorPage change
  Fix a crash on the help screen (issue reported at login phase) where we were accessing the selected site, but there isn't any site in the app yet.
  Revert "Run connected tests on CI for every PR(round 2)"
@daniloercoli daniloercoli requested a review from hypest July 30, 2019 13:43
…s) info are not still there.

We should not track this to false, when the user has instead it on `gutenberg`. The analytics are then bumped later at next startup, or when switching site. cc @hypest
@hypest
Copy link
Contributor

hypest commented Jul 30, 2019

Hey Danilo, saw 6c2f05a but I wonder if it will make it hard for us to understand the tracks if we don't set a value there. Like, when that case happens that we don't still have the setting at hand, how will we interpret the tracks we see? WDYT? 🤔

@daniloercoli
Copy link
Contributor Author

Hey Danilo, saw 6c2f05a but I wonder if it will make it hard for us to understand the tracks if we don't set a value there. Like, when that case happens that we don't still have the setting at hand, how will we interpret the tracks we see? WDYT? 🤔

Well, right after the login we don't have the info to bump the property IS_GUTENBERG_ENABLED correctly, since sites info are still not there. I think its's better to not add a wrong value (false) and do not pass it altogether. The correct value will be bump later. I think we can refresh metadata when the editor info are returned from the server, even though it could increase the calls to refreshMetadata.

It should not be a big difference, backend query side, since we can read the most recent event from the Track and check if the user has GB on or off.

On a side note, there is no user related GB setting anymore, wondering if we need to keep this property at user level...can't we move it to the general properties added when tracking events with site details trackWithSiteDetails?

@jkmassel
Copy link
Contributor

I'm bumping this to 13.1 as part of the 13.0 code freeze.

If you'd like it to be released as part of 13.0, please merge it against release/13.0 then DM me, and I'll be happy to issue a new beta release! :)

@jkmassel jkmassel modified the milestones: 13.0, 13.1 Jul 30, 2019
@daniloercoli daniloercoli changed the base branch from develop to release/13.0 July 31, 2019 07:43
// If saved site exist, then add info
if (selectedSite != null) {
// If saved site exist, then add editor info
if (selectedSite != null && !TextUtils.isEmpty(selectedSite.getMobileEditor())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently (see here that the flag is set in the user section) we'll write false by default even if we skip setting the flag here. Perhaps leaving empty is a better approach so, wdyt about introducing an additional flag in AnalyticsMetadata to denote if we have set the flag at AnalyticsMetadata.mIsGutenbergEnabled at all or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in b59bd91

…rties, when there is at least one site with the Block Editor enabled on it.

cc @etoledom

if (!newSitePopupNeeded) {
// Don't track the activation of the block editor on new sites.
// The flip to GB happened at site creation time, and the flip is tracked there with proper details
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, should the SiteUtils.enableBlockEditor(mDispatcher, mSite); (line number 1557 above) be inside this conditional too then? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think it's better to keep it out, since the user can change the option back to Aztec from settings right after the site creation. Even before creating/opening a new post. It's an edge case I know, but better to show both the dialog and repeat the network call to the server. It's just a call, that doesn't change anything on new sites 99% of the cases.

Copy link
Contributor Author

@daniloercoli daniloercoli Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per chat convo - cleaned up the code and made more easy to follow in 4db8228

@hypest
Copy link
Contributor

hypest commented Aug 5, 2019

Test 1:

  • Flip the block editor setting in Site settings and make sure the property is added correctly

Test 2:

  • Create a new site, and make sure the property is added with the correct value
  • Tap on new post, and make sure nothing is tracked

Test 3:

  • Clear your editor settings on the web
  • Re-install the app
  • open a block based post
  • the popup should appear, and the correct property value bumped with analytics

Verified that all test cases worked fine for me 👍

Copy link
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hypest hypest merged commit 32c9374 into release/13.0 Aug 5, 2019
@oguzkocer oguzkocer deleted the add/analitycs-to-GB-editor-flip branch April 15, 2020 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants