Google Analytics · Arazzo Workflow

Google Analytics Audit a Property's Custom Definitions

Version 1.0.0

List the custom dimensions and then the custom metrics defined on a GA4 property.

1 workflow 1 source API 1 provider
View Spec View on GitHub AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine LearningAttributionArazzoWorkflows

Provider

google-analytics

Workflows

audit-custom-definitions
List the custom dimensions and custom metrics defined on a property.
Lists the custom dimensions on the property, then lists the custom metrics on the same property.
2 steps inputs: accessToken, property outputs: customDimensions, customMetrics
1
listCustomDimensions
analyticsadmin.properties.customDimensions.list
List the custom dimensions registered on the property, returning up to 200 in a single page.
2
listCustomMetrics
analyticsadmin.properties.customMetrics.list
List the custom metrics registered on the property, returning up to 200 in a single page.

Source API Descriptions

Arazzo Workflow Specification

google-analytics-audit-custom-definitions-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Google Analytics Audit a Property's Custom Definitions
  summary: List the custom dimensions and then the custom metrics defined on a GA4 property.
  description: >-
    An audit flow on the GA4 Admin API that enumerates a property's custom
    definitions. The workflow lists the custom dimensions registered on a
    property and then lists the custom metrics, returning both collections so a
    caller can review what custom data has been configured for reporting. Each
    request is spelled out inline, including the OAuth bearer authorization.
  version: 1.0.0
sourceDescriptions:
- name: analyticsAdminApi
  url: ../openapi/google-analytics-admin-api.yaml
  type: openapi
workflows:
- workflowId: audit-custom-definitions
  summary: List the custom dimensions and custom metrics defined on a property.
  description: >-
    Lists the custom dimensions on the property, then lists the custom metrics
    on the same property.
  inputs:
    type: object
    required:
    - accessToken
    - property
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token with an analytics read scope.
      property:
        type: string
        description: 'GA4 property resource name (e.g. properties/1234).'
  steps:
  - stepId: listCustomDimensions
    description: >-
      List the custom dimensions registered on the property, returning up to 200
      in a single page.
    operationId: analyticsadmin.properties.customDimensions.list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: parent
      in: path
      value: $inputs.property
    - name: pageSize
      in: query
      value: 200
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customDimensions: $response.body#/customDimensions
      dimensionsNextPageToken: $response.body#/nextPageToken
  - stepId: listCustomMetrics
    description: >-
      List the custom metrics registered on the property, returning up to 200 in
      a single page.
    operationId: analyticsadmin.properties.customMetrics.list
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: parent
      in: path
      value: $inputs.property
    - name: pageSize
      in: query
      value: 200
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customMetrics: $response.body#/customMetrics
      metricsNextPageToken: $response.body#/nextPageToken
  outputs:
    customDimensions: $steps.listCustomDimensions.outputs.customDimensions
    customMetrics: $steps.listCustomMetrics.outputs.customMetrics