-
Notifications
You must be signed in to change notification settings - Fork 293
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
Improve Behaviour of 'Maybe Later' link on Connect GA CTA for Key Metrics Widget #7285
Comments
Thanks @jimmymadon – I added a sub-point to clarify the first – is that correct? Regarding the second point, is this a change or only here to ensure that this behavior is preserved? |
@aaemnnosttv - The sub point look good - I had written something similar but it sounded like a possible "implementation" to achieve the main point, so I left it out. The second point just needs to be preserved. I felt like adding it only because that point was technically not fully met in #6265 - i.e., the banner was not showing up when "GA4 was disconnected (again) after the Key Metrics widget was setup". So it can be skipped but added here just for context, completeness and to ensure no regression comes up. |
I avoided using implementation specific language for that reason but it is a bit closer than usual. It's okay to add clarity in cases like this I think. AC 👍 |
IB ✅ |
QA Update: ❌@kuasha420 I have tried this on two sites and when I disconnect and reconnect Analytics after clicking on the 'Maybe later' link, the CTA still does not appear asking me to complete the user survey. I tested this on the I added a screencast below. In this scenario, I disconnected and reset Site Kit and then set up Analytics, but the same issue occurs if you simply go to settings and disconnect/reconnect Analytics. cta.mp4 |
@wpdarren, sorry for the confusion, but this issue is about the Connect GA full Width CTA, not the Key metrics CTA. Thank you. |
@kuasha420 apologies too for not spotting this, bit slack on my part. |
QA Update:
|
@jimmymadon the issue is, this ticket is merged and part of 1.107.0. 🤔 |
QA Update: ✅As per conversation with @jimmymadon on Slack. We need to move this to approved. Unable to test until #7278 is in QA. I have added a comment to ensure that we test this scenario in that ticket which will be post-bug bash. |
Will revisit in #7278 |
Bug Description
While testing #6265 I discovered that if you click on the 'Maybe later' link on the new Key Metrics Connect Google Analytics CTA, it does disappear, but when you connect Analytics again, and then disconnect later, the CTA no longer appears. There was a discussion on the best way to implement this in the comments but due to its complexity it was decided that we should create a ticket.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Implementing the
remove
MethodIn
includes/Core/Dismissals/Dismissed_Items.php
:remove
, which receives an argument$item
(string). This method is responsible for removing the provided$item
from thedismissed_items
option.Dismissed_Items::get
method, resulting in an array of dismissed items.$item
from the array of dismissed items.User_Setting::set
method.Invocation of the
remove
Method During Module ActivationIn
includes/Modules/Analytics_4.php
:Module_With_Activation
interface in theAnalytics_4
class.on_activation
. This method should invoke theDismissed_Items::remove
method, passingkey-metrics-connect-ga4-cta-widget
as the item to remove.Test Coverage
tests/phpunit/integration/Core/Dismissals/Dismissed_ItemsTest.php
, add a new testtest_remove
, that tests theremove
method.tests/phpunit/integration/Modules/Analytics_4Test.php
, add a new testtest_on_activation
that tests theon_activation
method.QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: