-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Google Analytics - add async options for properties #17255
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughThe changes introduce a reusable async property selector for Google Analytics properties by adding a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant App
participant GoogleAnalyticsAPI
User->>Action: Select property via async options
Action->>App: Request property options (listProperties)
App->>GoogleAnalyticsAPI: GET /accountSummaries
GoogleAnalyticsAPI-->>App: Return account summaries
App-->>Action: Return property list
User->>Action: Submit action with selected property
Action->>App: (If needed) Extract property ID
Action->>GoogleAnalyticsAPI: Perform action with correct property ID
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/google_analytics/actions/create-ga4-property/create-ga4-property.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/google_analytics/actions/create-key-event/create-key-event.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/google_analytics/actions/run-report/run-report.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
components/google_analytics/actions/create-ga4-property/create-ga4-property.mjs
(1 hunks)components/google_analytics/actions/create-key-event/create-key-event.mjs
(1 hunks)components/google_analytics/actions/run-report-in-ga4/run-report-in-ga4.mjs
(2 hunks)components/google_analytics/actions/run-report/run-report.mjs
(1 hunks)components/google_analytics/google_analytics.app.mjs
(2 hunks)components/google_analytics/package.json
(1 hunks)components/google_analytics/sources/page-opened/page-opened.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Lint Code Base
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
- GitHub Check: Publish TypeScript components
🔇 Additional comments (12)
components/google_analytics/sources/page-opened/page-opened.mjs (1)
7-7
: LGTM: Coordinated version bump.The version increment aligns with the package-wide updates for this release.
components/google_analytics/google_analytics.app.mjs (1)
26-37
: LGTM: Well-implemented async property selector.The new property propDefinition provides a clean interface for selecting Google Analytics properties with async options loading.
components/google_analytics/package.json (1)
3-3
: LGTM: Appropriate patch version increment.The version bump from 0.2.0 to 0.2.1 correctly reflects the addition of new functionality and coordinated component updates.
components/google_analytics/actions/create-ga4-property/create-ga4-property.mjs (1)
8-8
: LGTM: Coordinated version bump.The version increment maintains consistency with the package-wide updates for this release.
components/google_analytics/actions/run-report/run-report.mjs (2)
5-5
: LGTM: Coordinated version bump.The version increment aligns with the package-wide updates for this release.
7-7
: LGTM: Improved documentation text.The description text change from "See the docs here" to "See the documentation" is a minor but professional improvement.
components/google_analytics/actions/create-key-event/create-key-event.mjs (2)
7-7
: LGTM: Version bump is appropriate.The minor version increment reflects the change to use propDefinition for the parent property.
12-16
: ```shell
#!/bin/bashLocate and display the implementation of listProperties in the Google Analytics app
rg -n "listProperties" -A5 -B5 components/google_analytics/google_analytics.app.mjs
</details> <details> <summary>components/google_analytics/actions/run-report-in-ga4/run-report-in-ga4.mjs (4)</summary> `5-5`: **LGTM: Version bump is appropriate.** The minor version increment reflects the changes to use propDefinition and add property processing. --- `7-7`: **LGTM: Minor description improvement.** The removal of "here" from the documentation link makes the sentence more concise. --- `12-16`: **LGTM: Consistent use of propDefinition.** The change to use `propDefinition` for the property aligns with the standardization effort across Google Analytics actions. --- `69-71`: **Verify consistency in property handling across actions.** This action extracts only the numeric portion from the property (line 69), while the `create-key-event` action uses the full property value directly. This inconsistency suggests different API requirements, but it should be verified that both approaches are correct for their respective endpoints. ```shell #!/bin/bash # Description: Compare property usage patterns across Google Analytics actions # Expected: Understand if different endpoints require different property formats # Search for property usage in Google Analytics actions rg -A 5 -B 5 "this\.property|parent.*properties" --type js --glob "**/google_analytics/**/*.mjs"
components/google_analytics/actions/run-report-in-ga4/run-report-in-ga4.mjs
Show resolved
Hide resolved
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.
LGTM!
Resolves #17147
Resolves #17133
Note: I wasn't able to find a way to use async options for
viewId
. UA (Universal Analytics) has been deprecated in favor of G4.Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Chores