View as .md ↗
Google Analytics

Google Analytics | Compare Periods

MCP server · Marketing · analytics.google.com · 5 categories · 11 tools

Powered by Advanced GSC ↗

Google Analytics is Google's web and app analytics platform. This integration lets your AI workflows read that data — properties, audience and engagement metrics, and traffic sources — for the properties your connected Google account can access.

ga4_compare-periods

Compare traffic metrics between two date ranges, with a scope-aware second breakdown. When organicOnly is true (default) it breaks Organic Search down by search engine, so you can reconcile Search Console Google-only clicks against GA4 all-engine organic sessions. When organicOnly is false it breaks all traffic down by channel. Run ga4_list-properties first if you don't have a property ID.

Tool Input

propertyIdstringrequired— Numeric GA4 property ID (e.g. "123456789"). Get it from ga4_list-properties if you don't have one.(pattern: ^\d{1,15}$)
period1Startstringrequired— First period start. "YYYY-MM-DD" or a GA4 relative token (e.g. "30daysAgo", "today").(min length: 1, max length: 30)
period1Endstringrequired— First period end. "YYYY-MM-DD" or a GA4 relative token (e.g. "today").(min length: 1, max length: 30)
period2Startstringrequired— Second (baseline) period start. "YYYY-MM-DD" or a GA4 relative token (e.g. "30daysAgo").(min length: 1, max length: 30)
period2Endstringrequired— Second (baseline) period end. "YYYY-MM-DD" or a GA4 relative token (e.g. "today").(min length: 1, max length: 30)
organicOnlyboolean— Filter to organic search only. Defaults to true when omitted.

Tool Output

propertyIdstringrequired— The GA4 property this data came from, as a bare numeric id.
scopestringrequired— Traffic scope applied — "Organic Search" when organicOnly is true (the default), "All Traffic" when false. This tool has no channel_filter input, so scope is never a specific channel.
organicOnlybooleanrequired— Whether the comparison was scoped to organic search.
period1objectrequired— The period identified by period1Start/period1End — the subject/numerator period for percentage-change calculations.
startDatestringrequired— Window start, echoing the request ("YYYY-MM-DD" or a relative form).
endDatestringrequired— Window end, echoing the request.
period2objectrequired— The baseline period — the denominator for percentage changes.
startDatestringrequired— Window start, echoing the request ("YYYY-MM-DD" or a relative form).
endDatestringrequired— Window end, echoing the request.
metricsarrayrequired— Metric-by-metric comparison across the two periods.
[]object
metricstringrequired— GA4 metric API name, e.g. "sessions", "engagementRate".
labelstringrequired— Human-readable metric name.
isRatebooleanrequired— True for rate metrics. Their pctChange is a relative change, not a difference in percentage points.
period1numberrequired— Value in the period1 window (the subject/numerator for pctChange). Rate metrics are fractions in [0,1].
period2numberrequired— Value in the period2 window (the baseline/denominator for pctChange). Rate metrics are fractions in [0,1].
pctChangenumbernullrequired— (period1 − period2) / period2 × 100; null when period2 is zero (percentage undefined).
breakdownobjectrequired— Breakdown of the session change by engine or channel.
dimensionstringrequired— Mirrors the scope: search engines within organic, channels across all traffic. Known values: "engine", "channel" — open-ended, a partner-added value is passed through.
rowsarrayrequired— Per-engine or per-channel comparison, ranked by period1 sessions, descending.
[]object
7 fields
keystringrequired— Engine or channel name.
sessionsP1numberrequired
sessionsP2numberrequired
sessionsPctChangenumbernullrequired— (sessionsP1 − sessionsP2) / sessionsP2 × 100; null when sessionsP2 is zero (percentage undefined).
usersP1numberrequired
usersP2numberrequired
usersPctChangenumbernullrequired— (usersP1 − usersP2) / usersP2 × 100; null when usersP2 is zero (percentage undefined).
otherobjectnullrequired— Sessions in the scope total that the rows do not account for (GA4 thresholding, unattributed traffic, rows past the display cap). Users are de-duplicated and not additive, so there is no users equivalent. null when the rows account for everything.
sessionsP1numberrequired
sessionsP2numberrequired
sessionsPctChangenumbernullrequired

We're Adding More Google Analytics Tools Constantly!

Don't see a specific Google Analytics tool you need? Email [email protected] and we can add it.

Google Analytics Frequently Asked Questions

What does the Compare Periods tool do?

This page documents the Compare Periods tool (ga4_compare-periods). Compare traffic metrics between two date ranges, with a scope-aware second breakdown. When organicOnly is true (default) it breaks Organic Search down by search engine, so you can reconcile Search Console Google-only clicks against GA4 all-engine organic sessions. When organicOnly is false it breaks all traffic down by channel. Run ga4_list-properties first if you don't have a property ID. It is one of the Google Analytics Traffic tools, invoked through your firm's Weave MCP connection and available to members whose access level permits it.

What does the breakdown inside compare-periods show?

When organicOnly is true (the default) it breaks Organic Search down by search engine, useful for reconciling Search Console's Google-only clicks against GA4's all-engine organic sessions. When organicOnly is false it breaks all traffic down by channel instead.

How is pctChange calculated?

(period1 − period2) / period2 × 100, period2 is the baseline/denominator, and pctChange is null when period2 is zero (percentage undefined), not when period1 is zero.

What is the Google Analytics integration?

The Google Analytics integration connects your firm's Google Analytics account to Weave. Google Analytics is Google's web and app analytics platform. This integration lets your AI workflows read that data, properties, audience and engagement metrics, and traffic sources, for the properties your connected Google account can access. It groups 11 tools into 5 categories, exposed through your firm's Weave MCP connection and filtered per member by access level.

How does my firm connect Google Analytics to Weave?

An admin authorizes a Google account with access to your GA4 properties once, via Google's OAuth consent flow in the Weave console. Every firm member then works through that single connection, there is no per-member Google sign-in.

Can these tools change anything in Google Analytics?

No. Every ga4 tool is read-only reporting, none of them can edit a property, change tracking configuration, or modify GA4 data.

Do I need to specify a property every time?

Yes, run ga4_list-properties first to get the numeric propertyId for the account/property you want; every other ga4 tool requires it.

What does organicOnly mean on these reports?

Most tools default to organicOnly: true, scoping the report to organic search traffic; widen the scope with organicOnly: false, or narrow it further with a channelFilter where the tool supports one.

Related Tools