-
Notifications
You must be signed in to change notification settings - Fork 178
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
Settings: Add new dropdown for choosing analytics behavior #13567
Conversation
…e tracking handler
… selection This dropdown will only be visible when SiteKit is installed & active.
packages/wp-dashboard/src/components/editorSettings/googleAnalytics/index.js
Outdated
Show resolved
Hide resolved
packages/wp-dashboard/src/components/editorSettings/googleAnalytics/index.js
Outdated
Show resolved
Hide resolved
…rameter to the constructor
….com/GoogleForCreators/web-stories-wp into feat/13506-flexible-tracking-support
1. Check if dropdown has rendered 2. Check if SiteKit specific message is displayed 3. Check if `handleUpdateGoogleAnalyticsHandler` is called with the appropriate values
{analyticsHandler === GOOGLE_ANALYTICS_HANDLER_TYPE.SITE_KIT && ( | ||
<TextInputHelperText size={TextSize.Small}> | ||
<TranslateWithMarkup> | ||
{TEXT.SITE_KIT_IN_USE} | ||
</TranslateWithMarkup> | ||
</TextInputHelperText> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our last meeting we discussed always displaying this text.
However, after looking at it again, I think we can simply remove it. It doesn't add any value in this new layout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think current behaviour seems more clear from user's point of view. Because, note is necessary to convey to the user that Site Kit
has enabled Google Analytics and will be used to track analytics.
WDYT 🤔
Option | Note |
---|---|
Use Site Kit for analytics (default) | Note: Site Kit by Google has already enabled Google Analytics for your Web Stories, all changes to your analytics tracking should occur there. |
Use only Web Stories for analytics | - |
Use both | - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think current behaviour seems more clear from user's point of view. Because, note is necessary to convey to the user that
Site Kit
has enabled Google Analytics and will be used to track analytics.
The problem is that this note does not convey this at all. The option in the dropdown does.
That's why the text needs updating and why I don't think it makes sense to show this Note only when the first option is chosen. Either always show it (if Site Kit is active), or never show it.
If we want to rephrase it still, it would make more sense to use something like:
If Site Kit is active, it will be used to set up Google Analytics by default. However, you can customize the behavior in case you need more flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Site Kit is active, it will be used to set up Google Analytics by default. However, you can customize the behavior in case you need more flexibility.
Seems to make more sense 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swissspidy I have updated Site Kit note to be displayed regardless of option chosen in the analytics dropdown.
Commit Ref: b86ae3c
Please let me know if anything else needs to be taken care of. Otherwise, the PR is ready for final review.
…ve and `analyticsHandler` is `site-kit`
Marking as ready for review so that I can test this on the QA environment |
Plugin builds for 8b792a2 are ready 🛎️!
|
Size Change: +385 B (0%) Total Size: 2.77 MB
ℹ️ View Unchanged
|
…d on changing the dropdown option
packages/wp-dashboard/src/components/editorSettings/googleAnalytics/index.js
Outdated
Show resolved
Hide resolved
packages/wp-dashboard/src/components/editorSettings/googleAnalytics/index.js
Outdated
Show resolved
Hide resolved
….com/GoogleForCreators/web-stories-wp into feat/13506-flexible-tracking-support
Summary
This PR add support for flexible Tracking Handler. When SiteKit is installed and active, in WebStories Settings - it will provide a dropdown with options to select:
User-facing changes
A dropdown has been added to select the analytics tracking handler. The dropdown is only shown if Site Kit analytics module is active.
Dropdown options:
Testing Instructions
Scenario 1: Selecting "Use Site Kit for analytics (default)":
web_stories_ga_tracking_handler
option changes tosite-kit
upon selecting this option.Scenario 2: Selecting "Use only Web Stories for analytics":
web_stories_ga_tracking_handler
option changes toweb-stories
.Scenario 3: Selecting "Use both":
web_stories_ga_tracking_handler
option changes toboth
.Reviews
Does this PR have a security-related impact?
No.
Does this PR change what data or activity we track or use?
🤔
Does this PR have a legal-related impact?
No.
Checklist
Type: XYZ
label to the PRFixes #13506