Actions9
Source Hours TopK (Helper)
AI-generatedSummary
Aggregate GA4 session metrics by specified traffic sources and compute the top K weekday-hour buckets for best engagement times, mapping these into upcoming datetime slots over a defined horizon.
Inputs
- Property ID (required) — Specify the GA4 numeric property ID to query data from.
- Session Sources (comma-separated) (required) — Provide a comma-separated list of session sources (e.g., linkedin, t.co) to filter the data for relevant traffic sources.
- Use Source/Medium — Toggle to match sessionSourceMedium instead of sessionSource, allowing more specific source/medium filtering.
- Metric for Timing — Select which metric to aggregate by hour and weekday when determining top time buckets (Page Views, Sessions, Engaged Sessions).
- Label Time Zone (IANA) — Set the IANA time zone used to generate human-readable labels for suggested time slots.
- Occurrence Mode — Choose to return only the next occurrence of each top bucket or expand weekly occurrences within the horizon.
- Max Occurrences per Bucket — Limits the maximum number of weekly repeated occurrences per bucket when using 'Expand within horizon' mode.
- Lookback (days) — Number of past days to aggregate data for identifying optimal timing buckets.
- Top K Buckets — Number of top (weekday, hour) buckets to return, representing best time slots.
- Horizon (days ahead) — The future time window in days over which to map the top buckets into actual upcoming ISO datetimes.
- Return Property Quota — Optionally include current GA4 API quota usage info in the response to monitor API limits.
Output shape
a single JSON object containing the operation name, list of candidate ISO datetime slots mapped from the top buckets, labels in the specified timezone, detailed bucket metrics with rank, weekday, hour, score, share, the metric used in report, lookback and horizon days, occurrence mode, top K value, propertyQuota data if requested, and raw GA4 report data.
The response includes calculated best time slots for the specified session sources based on historical data over the lookback period. Occurrence mode controls whether next single or repeated weekly slots are returned. The time zone input affects only labeling, not underlying hour calculations. Errors from GA4 API or missing parameters result in node errors unless 'Continue On Fail' is enabled.
Examples
Example 1: Identify optimal weekday-hour time slots for sessions originating from linkedin and instagram over the last 60 days, returning the top 3 time buckets and mapping them to the next 14 days in the Europe/Berlin timezone.
Property ID set to your GA4 numeric property ID; sessionSources='linkedin,instagram'; timingMetric='sessions'; topK=3; horizonDays=14; timeZone='Europe/Berlin'; occurrenceMode='first'; returnQuota=true.