Marketing

Google Analytics

Connect Google Analytics to a MeDo app: list GA4 accounts and properties, read traffic reports and live visitors, look up a web stream measurement ID, and add tracking to the app.

Updated 2026-10-09

Google Analytics is a connector: it links a MeDo app to one Google account that can open your Google Analytics 4 (GA4) properties, so the app can list accounts and properties, read standard and realtime reports, and look up a web data stream's measurement ID. Everything the app sees comes from the account you connected, and access is read-only.

What you can build

  • A traffic dashboard. Pick a property and show page views, sessions, and users for a date window as a daily chart, plus the top pages.
  • A weekly report. Compare this week with last week by traffic source, country, or device and highlight the biggest changes.
  • A live visitors panel. Show how many people were active on the site in the last 30 minutes and which pages they are viewing.
  • Tracking for the app itself. Read a web stream's measurement ID so the app can send its own page views and events, such as a sign_up event, to Google Analytics.

Google Analytics fits when the app needs the owner's real traffic data. It cannot create or change properties, data streams, or settings — see Limits.

Build examples

Copy one of these into the prompt box. The first one is the smallest useful starting point.

Use @Google Analytics to build a traffic dashboard that only I can sign in to, where I pick a GA4 property and see the last 7 days of page views, sessions, and users as a daily chart, plus the top pages.
Use @Google Analytics to build a weekly traffic report that only I can sign in to, comparing this week with last week by traffic source and highlighting the biggest changes.
Use @Google Analytics to build a live visitors panel that shows how many people are on my site right now and which pages they are viewing.
Use @Google Analytics to add Google Analytics tracking to this app with my GA4 web stream's measurement ID, and send a sign_up event when someone registers.

The wording matters: say who the page is for and what it should show. "A dashboard only I can sign in to" produces a different app from "a public visitor counter".

Prepare and connect

You need a Google account that can open the GA4 properties the app should use. No API key, no Google Cloud project, and no billing setup are involved.

  1. Open Skills & Connectors in the sidebar and search for Google Analytics.
  2. Open the Google Analytics card and click Connect.
  3. Sign in to the Google account and approve the read-only access MeDo asks for.
  4. The button changes to Connected. That is the success state; you do not need to copy anything back into the app.

If you start building before connecting, MeDo notices and shows a Google Analytics connection button under its reply. You can connect there instead. If no button appears, use the connector card described above.

Use it in your app

  • The app uses the owner's connected account, not each visitor's own Google account. Every visitor who reaches a traffic view sees the same account's data. Put dashboards that expose several properties or free-form reports behind your app's own sign-in. A page titled "private" is not access control on its own. A page that shows one fixed site's headline numbers can be public, as long as the property is fixed on the server and visitors cannot choose another one.
  • Copy property IDs from the connected account. Use the properties/<id> value that Google Analytics returns. Do not guess it or reuse an ID from another account.
  • Standard reports lag. New traffic can take 24 to 48 hours to appear in standard reports. Realtime data appears within minutes and covers about the last 30 minutes. An empty report means no traffic in that window, not a failure.
  • Reports return values as text. Convert each value to a number in the order of the report headers before drawing a chart. When a report compares two date ranges, Google Analytics adds a date-range column.
  • Large reports page in rows. A single request returns up to 1,000 rows; ask for the next page when you need more.
  • Never show made-up numbers. If the account is not connected or the report is empty, the page should say so instead of showing sample data.
  • Look up the measurement ID instead of typing one from memory. MeDo reads it from the property's web data stream, so the tracking code uses the real ID.

Limits and troubleshooting

What you may expectWhat actually happens
Create or edit properties, data streams, or goalsNot available. The connector is read-only.
Data for a property the connected account cannot openNot available. Connect an account that has access.
Per-visitor Google accountsNot available. The app uses the creator connection.
Same-minute numbers in standard reportsNot available. Standard reports lag by up to 48 hours; use the realtime view for the last 30 minutes.
Funnel reports or key-event listsNot available in this version.
Alerts or webhooksNot available. The app reads data when it loads or refreshes.

"Connection required" appears in the app. The Google Analytics connection belongs to the app owner. Ask the owner to open the connector card and click Connect, then reload.

Reports show zeros or an empty chart. That usually means the property had no traffic in the window, or the data has not landed yet. Widen the dates, or check that the site actually sends data to this property.

The property list is empty. The connected Google account cannot open any GA4 property. Connect the account that owns the properties.

Visitors can see analytics when they should not. The connection is shared. Add sign-in and server-side restrictions to the app; see Managing access & roles.