Google Analytics

Access Google Analytics data and generate comprehensive reports for website performance analysis. Through Langdock’s integration, you can access and manage Google Analytics directly from your conversations.

circle-info

Authentication: OAuth Category: Google Workspace Availability: All workspace plans

Available Actions

Get Realtime Users by Device

googleanalytics.getRealtimeUsersbyDevice

Retrieves active users in the last 30 minutes broken down by device category (desktop, mobile, tablet)

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

Output: Returns realtime user data broken down by device category


Run Report

googleanalytics.runReport

Generate custom analytics reports with flexible date ranges, metrics, and dimensions

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

    • startDate (TEXT, Required): Start date for the report in YYYY-MM-DD format or relative date (e.g., ‘7daysAgo’, ‘yesterday’)

    • endDate (TEXT, Required): End date for the report in YYYY-MM-DD format or relative date (e.g., ‘yesterday’, ‘today’)

    • metrics (TEXT, Required): The metric to include in the report (e.g., ‘sessions’, ‘activeUsers’, ‘screenPageViews’, ‘bounceRate’)

    • dimensions (TEXT, Optional): Optional dimension to group the data by (e.g., ‘country’, ‘deviceCategory’, ‘pagePath’, ‘sessionSource’)

    • pageFilter (TEXT, Optional): Optional filter to include only pages containing this text (e.g., ‘/de/pricing’, ‘/features’, ‘/blog’)

Output: Returns analytics report data with the following structure:

  • dimensionHeaders: Information about the dimensions in the report

  • metricHeaders: Information about the metrics in the report

  • rows: Array of data rows containing dimension and metric values

  • totals: Summary totals for the report

  • rowCount: Number of rows in the report


Run Pivot Report

googleanalytics.runPivotReport

Generate advanced pivot table reports for data analysis, correlation discovery, and comparing high/low performers across multiple dimensions

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

    • startDate (TEXT, Required): Start date for the report in YYYY-MM-DD format or relative date (e.g., ‘30daysAgo’, ‘7daysAgo’)

    • endDate (TEXT, Required): End date for the report in YYYY-MM-DD format or relative date (e.g., ‘yesterday’, ‘today’)

    • metrics (TEXT, Required): Comma-separated list of metrics to analyze (e.g., ‘sessions,activeUsers,screenPageViews,bounceRate’)

    • dimensions (TEXT, Required): Comma-separated list of ALL dimensions you want to analyze. Note: In pivot reports, only dimensions that are also specified in ‘Pivot dimensions’ will be used to avoid API errors.

    • pivotDimensions (TEXT, Required): Comma-separated list of specific dimensions to use as pivot columns/rows. These should be a subset of the dimensions above (e.g., ‘deviceCategory’ or ‘deviceCategory,country’)

Output: Returns pivot table report data with cross-tabulated results


Get Metadata

googleanalytics.getMetadata

Retrieve all available dimensions and metrics for the property, including custom dimensions and metrics

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

Output: Returns metadata including all available dimensions and metrics for the property


Analyze Content Performance

googleanalytics.analyzeContentPerformance

Specialized report for analyzing page/content performance to identify high and low performers, detect anomalies, and understand topic effectiveness

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

    • startDate (TEXT, Required): Start date for the analysis in YYYY-MM-DD format or relative date (e.g., ‘30daysAgo’, ‘7daysAgo’)

    • endDate (TEXT, Required): End date for the analysis in YYYY-MM-DD format or relative date (e.g., ‘yesterday’, ‘today’)

    • sortBy (TEXT, Optional): Metric to sort results by to identify top/bottom performers (e.g., ‘sessions’, ‘activeUsers’, ‘engagementRate’, ‘bounceRate’)

    • limit (NUMBER, Optional): Maximum number of pages/content to return (default: 50, max: 100)

    • pageFilter (TEXT, Optional): Filter to include only pages containing this text (e.g., ‘pricing’, ‘blog’, ‘features’). Leave empty for all pages.

    • metrics (TEXT, Optional): Optional comma-separated list of metrics to include (e.g., ‘sessions,activeUsers,screenPageViews’)

    • dimensions (TEXT, Optional): Optional comma-separated list of dimensions to group by (e.g., ‘pagePath,pageTitle’)

Output: Returns content performance analysis with page rankings and performance metrics


Analyze Traffic Sources

googleanalytics.analyzeTrafficSources

Analyze traffic sources, acquisition channels, and marketing performance to detect anomalies and identify effective channels

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

    • startDate (TEXT, Required): Start date for the analysis in YYYY-MM-DD format or relative date (e.g., ‘30daysAgo’, ‘7daysAgo’)

    • endDate (TEXT, Required): End date for the analysis in YYYY-MM-DD format or relative date (e.g., ‘yesterday’, ‘today’)

    • groupBy (SELECT, Optional): Dimension to group traffic sources by (source, medium, campaign, channelGroup)

    • metrics (TEXT, Optional): Optional comma-separated list of metrics to include (e.g., ‘sessions,activeUsers,newUsers,engagementRate’)

    • sortBy (TEXT, Optional): Optional metric name to sort results by (e.g., ‘sessions’)

Output: Returns traffic source analysis with channel performance metrics


Batch Run Reports

googleanalytics.batchRunReports

Generate multiple custom reports in a single API call for efficient data analysis and comparison

Requires Confirmation: No

Parameters:

  • propertyId (TEXT, Required): The Google Analytics 4 property ID. This is the numeric identifier for your GA4 property (e.g., 123456789)

    • reportRequests (MULTI_LINE_TEXT, Required): JSON array of report configurations. Each report should include startDate, endDate, metrics, and dimensions. Example: [startDate’: ‘7daysAgo’, ‘endDate’: ‘yesterday’, ‘metrics’: ‘sessions’, ‘dimensions’: ‘country, startDate’: ‘30daysAgo’, ‘endDate’: ‘yesterday’, ‘metrics’: ‘activeUsers’, ‘dimensions’: ‘sessionSource]

Output: Returns multiple reports in a single response for efficient data analysis


Add Event

googleanalytics.addEvent

Creates a new event in a specific calendar

Requires Confirmation: Yes

Parameters:

  • sendUpdates (TEXT, Optional): Whether to send notifications (‘all’, ‘externalOnly’, ‘none’)

    • startTime (TEXT, Required): Start time in RFC3339 format (e.g. ‘2025-03-15T09:00:00+01:00’)

    • description (TEXT, Optional): Description of the event (optional)

    • attendees (TEXT, Optional): List of attendees email adresses (optional)

    • recurrence (TEXT, Optional): List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed. The separator between rules is an empty space.

    • endTime (TEXT, Required): End time in RFC3339 format (e.g. ‘2025-03-15T10:00:00+01:00’)

    • calendarId (TEXT, Required): The id of the calendar (e.g. ‘primary’ for the main calendar)

    • location (TEXT, Optional): Location of the event (optional)

    • timeZone (TEXT, Required): IMPORTANT: If you don’t know the time zone of the user, ask him. DO NOT GUESS THE TIME ZONE (Example format: ‘America/New_York’)

    • title (TEXT, Required): Title of the event

    • eventType (TEXT, Optional): The type of event. Allowed values: default, focusTime, outOfOffice, workingLocation, etc. See Google Calendar API docs for full list. Provide one event type only

Output: Returns the created event with the following structure:

  • id: Event ID

  • summary: Event title

  • description: Event description

  • start: Start time information with dateTime and timeZone

  • end: End time information with dateTime and timeZone

  • location: Event location

  • attendees: Array of attendee objects with email addresses

  • recurrence: Recurrence rules if applicable

  • htmlLink: Link to view the event in Google Calendar

  • created: Creation timestamp

  • updated: Last update timestamp


Update Event

googleanalytics.updateEvent

Updates an event

Requires Confirmation: Yes

Parameters:

  • eventId (TEXT, Required): id of the event

    • endTime (TEXT, Optional): End time in RFC3339 format (e.g. ‘2025-03-15T10:00:00+01:00’)

    • startTime (TEXT, Optional): New start time in RFC3339 format (e.g. ‘2025-03-15T09:00:00+01:00’)

    • calendarId (TEXT, Required): The id of the calendar (e.g. ‘primary’ for the main calendar)

    • timeZone (TEXT, Optional): New time zone (e.g. ‘America/New_York’)

    • eventTitle (TEXT, Optional): New title of the event (optional)

    • attendees (TEXT, Optional): New list of attendees email adresses (optional)

    • description (TEXT, Optional): New description of the event (optional)

    • location (TEXT, Optional): New location of the event (optional)

    • sendUpdates (TEXT, Optional): New policy on whether to send notifications (‘all’, ‘externalOnly’, ‘none’) (optional)

    • recurrence (TEXT, Optional): New list of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed. The separator between rules is an empty space.

    • eventType (TEXT, Optional): The type of event to update. Allowed values: default, focusTime, outOfOffice, workingLocation, etc. See Google Calendar API docs for full list. Provide as comma separated list.

Output: Returns the updated event with its new details


Get Event

googleanalytics.getEvent

Gets an event

Requires Confirmation: No

Parameters:

  • eventId (TEXT, Required): The id of the specific event to retrieve

    • calendarId (TEXT, Required): The id of the calendar (can use ‘primary’ for the user’s primary calendar)

Output: Returns the event details including all properties and metadata


Search for Events

googleanalytics.searchforEvents

Gets calendar events by search query

Requires Confirmation: No

Parameters:

  • maxResults (TEXT, Optional): Maximum number of results to return (optional, default: 10)

    • searchQuery (TEXT, Optional): When using the search field for calendar events, input specific and relevant keywords that are likely to appear in the following fields:

      IMPORTANT DO NOT IGNORE: if asked to search things like an appointment, meeting, call, … do not include this term into the search query as these are synonyms for event

      • Summary or Title: Include keywords that describe the event, such as “Project Meeting,” “Quarterly Review,” or “Team Lunch.”

      • Description: Use terms related to the event’s content or purpose, like “budget discussion” or “client presentation.”

      • Location: Specify the name of the location or building where the event is held, such as “Conference Room A” or “Main Office.”

      • Attendees: Include names or email addresses of specific attendees, e.g., “[email protected]” or “Jane Smith.”

      • Organizer: Use the organizer’s name or email to find events they are hosting, such as “[email protected]” or “Michael Johnson.”

      • Working Location Properties: If applicable, use identifiers like office location labels or building IDs.

    • endDate (TEXT, Optional): End date of the time period searched for the search query. Upper bound (exclusive) for an event’s start time to filter by. Must be an RFC3339 timestamp with mandatory time zone offset (e.g., 2011-06-03T10:00:00-07:00). If Start date is set, End date must be greater than Start date.

    • calendarId (TEXT, Required): The id of the calendar to search (use ‘primary’ for user’s primary calendar)

    • startDate (TEXT, Optional): Start date of the time period searched for the search query. Lower bound (exclusive) for an event’s end time to filter by. Must be an RFC3339 timestamp with mandatory time zone offset. If End date is set, Start date must be smaller than End date.

    • desc (BOOLEAN, Optional): Select if the results be ordered in descending order (start time).

    • eventType (TEXT, Optional): The type of event to filter for. Allowed values: default, focusTime, outOfOffice, workingLocation, etc. See Google Calendar API docs for full list. Provide only one single event type.

Output: Returns an array of events matching the search criteria


Delete Event

googleanalytics.deleteEvent

Deletes an event

Requires Confirmation: Yes

Parameters:

  • eventId (TEXT, Required): id of the event that will be deleted. For event series note that if you provide an event instance id, it will delete just that instance, and if you provide a recurring event’s master id, it will delete the entire series. For an event instance id of a recurring event like 7hagg0gtspd2b03lm8i3g4irr0_20250318T160000Z, the part until the first _ is the event’s master id.

    • calendarId (TEXT, Required): The id of the calendar (e.g. ‘primary’ for the main calendar)

Output: Returns confirmation of the deletion


List Calendars

googleanalytics.listCalendars

Lists all calendars accessible to the authenticated user using the Google Calendar API /users/me/calendarList endpoint.

Requires Confirmation: No

Parameters:

  • maxResults (TEXT, Optional): Maximum number of entries to return in one result page (default: 100, max: 250).

    • minAccessRole (SELECT, Optional): Restricts results to calendars where the user has at least this access role. Allowed values: freeBusyReader, reader, writer, owner.

    • pageToken (TEXT, Optional): Token specifying which result page to return (for pagination).

    • showDeleted (BOOLEAN, Optional): Whether to include deleted calendar list entries in the result (default: false).

    • showHidden (BOOLEAN, Optional): Whether to show hidden entries (default: false).

    • syncToken (TEXT, Optional): For incremental sync, only return entries changed since the previous request with this token. Cannot be used with minAccessRole.

Output: Returns an array of calendars with the following structure:

  • id: Calendar ID

  • summary: Calendar name

  • description: Calendar description

  • timeZone: Calendar time zone

  • accessRole: User’s access role for this calendar

  • backgroundColor: Calendar color

  • foregroundColor: Text color for this calendar

  • selected: Whether this calendar is selected

  • primary: Whether this is the user’s primary calendar


Get Free/Busy for Calendar

googleanalytics.getFreeBusyforCalendar

Retrieves free/busy information for one or more calendars over a specified time range using the Google Calendar API /freeBusy endpoint.

Requires Confirmation: No

Parameters:

  • timeMin (TEXT, Required): RFC3339 timestamp for the start of the time range to check (inclusive). Example: 2025-05-15T08:00:00Z

    • timeMax (TEXT, Required): RFC3339 timestamp for the end of the time range to check (exclusive). Example: 2025-05-15T18:00:00Z

    • timeZone (TEXT, Optional): Time zone for the response (optional, defaults to UTC). Example: Europe/Berlin

    • items (TEXT, Required): List of calendar IDs to check (e.g., emails, resource IDs, or ‘primary’). Enter as a comma-separated list.

Output: Returns free/busy information with the following structure:

  • kind: API resource type

  • timeMin: Start of the queried range

  • timeMax: End of the queried range

  • calendars: Object containing free/busy information for each requested calendar

    • busy: Array of time ranges when the calendar is busy

    • errors: Any errors encountered for this calendar

Triggers

New Event

googleanalytics.newEvent

Triggers when new calendar events are created in specified calendars

Requires Confirmation: No

Parameters:

  • calendarId (TEXT, Optional): ID of the calendar to monitor for new events. Identifies which specific calendar to check for new events

    • daysToInclude (TEXT, Optional): Number of days in the future to look for events. Default is 30 days

Output: Returns information about newly created events


Event Start

googleanalytics.eventStart

Triggers when events are about to start within a specified time window

Requires Confirmation: No

Parameters:

  • calendarId (TEXT, Optional): ID of the calendar to monitor. Defaults to your primary calendar if not specified

    • minuteBefore (TEXT, Required): Number of minutes before an event starts to trigger the workflow. Default is 15 minutes

Output: Returns information about upcoming events


googleanalytics.newEventMatchingSearch

Triggers when new calendar events matching the specified search query are created

Requires Confirmation: No

Parameters:

  • calendarId (TEXT, Optional): ID of the calendar to monitor for new events. Identifies which specific calendar to check for new events

    • daysToInclude (NUMBER, Optional): Number of days in the future to look for events. Default is 30 days

    • searchQuery (TEXT, Required): Text to search for in event subjects. Examples: ‘Meeting’, ‘Review’, ‘Project kickoff’

Output: Returns information about events matching the search criteria

Common Use Cases

  • Data Management: Manage and organize your Google Analytics data

  • Automation: Automate workflows with Google Analytics

  • Reporting: Generate insights and reports

  • Integration: Connect Google Analytics with other tools

Best Practices

1

Getting Started

  • Enable the Google Analytics integration in your workspace settings

  • Authenticate using OAuth

  • Test the connection with a simple read operation

  • Explore available actions for your use case

2

Important Considerations

  • Ensure proper authentication credentials

  • Respect rate limits and API quotas

  • Review data privacy settings

  • Test operations in a safe environment first

Troubleshooting

Issue
Solution

Authentication failed

Verify your OAuth credentials

Rate limit exceeded

Reduce request frequency

Data not found

Check permissions and data availability

Connection timeout

Verify network connectivity

Support

For additional help with the Google Analytics integration, contact [email protected]envelope