GA4 means Google Analytics 4. Connect it to Grok Build to review measured website or app activity from the terminal. This article covers property selection and a traffic baseline; advertising delivery belongs in the Google Ads or Meta Ads guide.
What do you need before installing?
You need Grok Build installed and working in your terminal, a LoomaScale account, and browser access for authentication. This guide covers the Grok Build terminal agent. Install Grok Build first using xAI's getting started guide.
Use a Google identity with access to your GA4 property. Reporting needs the numeric property ID, not a web stream's G- measurement ID.
How do you install LoomaScale for Google Analytics 4 in Grok Build?
1. Install the LoomaScale plugin
Run this command in your terminal:
grok plugin install "loomascale/agent-plugin@main#plugins/loomascale" --trustThe quoted source selects the plugins/loomascale directory on the main branch. The --trust flag grants plugin trust so Grok can load its components. This installs LoomaScale's shared plugin, which uses https://api.loomascale.com/mcp; each data source still needs its own connection.
2. Start Grok and open the MCP menu
grokInside the Grok session, enter the following slash command:
/mcps3. Authenticate the loomascale connection
Select loomascale in the MCP list and start authentication. Complete the LoomaScale sign-in in your browser, then return to the terminal. The MCP menu supports i for OAuth sign-in. If the browser does not open automatically, use the sign-in URL shown by Grok.
4. Connect your Google Analytics 4 data source
Open Connections in LoomaScale and connect Google Analytics 4 with the provider identity that can access your data. Browser authentication for the plugin and permission to a platform account are separate steps.
Select Google Analytics in Connections. A Google Ads authorization does not authorize Analytics, even when the two products are linked in Google.
How do you verify access to Google Analytics 4?
Use LoomaScale to call ga4_get_account_summaries. List my GA4 property names and numeric IDs, then ask which property to use. Read its reporting time zone and currency. Do not edit settings.
Select a returned resource such as properties/123456789. Keep that property in subsequent reports and use its time zone for date boundaries.
How do you check traffic and key events in Grok Build?
Use a session acquisition report to establish the traffic mix, then investigate named events separately when necessary. Reporting definitions and attribution can differ from advertising platforms, so do not treat a discrepancy as a broken connection by default.
For the selected GA4 property, report sessions, engagedSessions and keyEvents by sessionDefaultChannelGroup over the last 7 complete days and the previous 7. State property ID, dates and time zone. Identify material changes and any unavailable or restricted data. Do not change configuration or claim a causal explanation from the report alone.
What can Grok Build do with Google Analytics 4 through LoomaScale?
LoomaScale supports GA4 reporting, realtime and funnel analysis. Separate configuration tools can change supported settings after approval of a dry run and require the appropriate editing role and granted permission. Connecting Grok does not install a website tag or reconstruct events that were never collected.
What if the plugin or account is missing?
Check the installation with grok plugin list. If needed, enable it with grok plugin enable loomascale, then start a new Grok session or reload the Plugins tab. Reopen /mcps and authenticate loomascale if sign-in is incomplete. If the server connects but the account is missing, check the provider connection and account permissions in LoomaScale.
If a report is empty, verify property ID, dates, filters and event collection. Recent data may be incomplete; compare complete periods and preserve metric names.
Connect Google Analytics 4 to another AI assistant
- Connect ChatGPT to Google Analytics 4
- Connect Claude to Google Analytics 4
- Connect Claude Code to Google Analytics 4
- Connect Codex to Google Analytics 4
Connect another data source to Grok Build
Install the shared plugin once. These guides cover different account types and first checks; follow the one for the data you need.
- Connect Grok Build to Google Ads
- Connect Grok Build to Meta Ads
- Connect Grok Build to LinkedIn Ads
- Connect Grok Build to Google Tag Manager
- Connect Grok Build to Google Merchant Center
- Connect Grok Build to Google Search Console
Sources and setup references
- xAI's Grok Build plugin installation guide
- xAI's MCP server and OAuth documentation
- Google Analytics 4 API reference
- LoomaScale plugin source and supported integrations
Setup references checked on November 15, 2026. Provider documentation explains platform behavior; the LoomaScale plugin defines the tools available through this connection.
