| Code-Review | +1 |
LGTM with one suggestion to make it less slightly simple since I think the current flow is over optimized for just the opt-in impression case and wouldn't work for the two others I know about. (And I suspect we'll have other impressions that will also need their own bespoke logic)
This CL adds OnOptinImpression to GlicBrowserHostMetrics and handles it by
recording the Glic.Onboarding.OptInImpression user action.nit: Click format in the message edit box to wrap this cleanly.
!is_client_ready_ || !visibility_tracker_->state()) {Not blocking but the method name and use of a `pending_impressions_` vector implies that other impressions will be logged through `FlushPendingImpression`. However this check and whole method is very specific to the `opt-in` impression and makes it so other impressions can't use this method.
Given that, it seems like: `MaybeRecordOptInImpression()` is a better method name and have a `is_opt_in_pending_` bool instead of the vector.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
BASE_DECLARE_FEATURE(kGlicRecordImpressionMetrics);nit: maybe rename to OptInImpressionMetrics or do you think we'll keep merging new impressions under the same flag?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This CL adds OnOptinImpression to GlicBrowserHostMetrics and handles it by
recording the Glic.Onboarding.OptInImpression user action.nit: Click format in the message edit box to wrap this cleanly.
Done
nit: maybe rename to OptInImpressionMetrics or do you think we'll keep merging new impressions under the same flag?
Done
!is_client_ready_ || !visibility_tracker_->state()) {Not blocking but the method name and use of a `pending_impressions_` vector implies that other impressions will be logged through `FlushPendingImpression`. However this check and whole method is very specific to the `opt-in` impression and makes it so other impressions can't use this method.
- Invoke should be recorded on `!visibility_tracker_->state()` regardless of `is_client_ready_`.
- WebAppImpression should be recorded everytime visibility_tracker_->state() is true and `is_client_ready_` is true. (e.g. we don't want to clear that from the vector.
Given that, it seems like: `MaybeRecordOptInImpression()` is a better method name and have a `is_opt_in_pending_` bool instead of the vector.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |