# google-analytics.properties.metadata

Dimensions and metrics a property offers, with custom ones

> Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.

Page: https://telipot.com/catalog/tasks/google-analytics.properties.metadata · Markdown: https://telipot.com/catalog/tasks/google-analytics.properties.metadata/md · JSON: https://telipot.com/catalog/tasks/google-analytics.properties.metadata/json

| Field | Value |
| --- | --- |
| provider | [Google Analytics 4](https://telipot.com/catalog/providers/google-analytics) `google-analytics` |
| capability | [`analytics.properties.metadata`](https://telipot.com/catalog/capabilities/analytics.properties.metadata) |
| kind | utility |
| tier | core |
| price | Free (Free from the tool) |
| identity | Company account |
| auth | `oauth · OAuth 2.0 with PKCE` |
| scope | own_account |
| principal | organization |
| required_scopes | `analytics.readonly` |
| retention | standard |
| route | `GET https://analyticsdata.googleapis.com/v1beta/properties/{propertyId}/metadata` |
| verification | Not verified yet. Not checked yet. We test with a real request before we mark it. |
| status | live |
| docs | https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata |

## Preview the price · nothing runs

```bash
telipot run google-analytics.properties.metadata \
  --input-json '{"propertyId":"123456789"}' \
  --quote
```

## Run it

```bash
telipot run google-analytics.properties.metadata \
  --input-json '{"propertyId":"123456789"}'
```

```bash
curl https://api.telipot.com/v1/tasks/google-analytics.properties.metadata/run \
  -H "Authorization: Bearer $TELIPOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"propertyId":"123456789"}'
```

## Input

| Field | In | Type | Required | Constraints | Note |
| --- | --- | --- | --- | --- | --- |
| `propertyId` | pathParams | string | yes |  | The numeric id of a GA4 property, as google-analytics.accounts.summaries returns it after properties/; 0 lists only the dimensions and metrics common to every property |

## Input schema

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "description": "The numeric id of a GA4 property, as google-analytics.accounts.summaries returns it after properties/; 0 lists only the dimensions and metrics common to every property",
      "examples": [
        "123456789"
      ]
    }
  },
  "required": [
    "propertyId"
  ],
  "additionalProperties": false
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The resource name, properties/<id>/metadata"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "apiName": {
            "type": "string",
            "description": "The name a report request uses"
          },
          "uiName": {
            "type": "string",
            "description": "The name Google Analytics shows"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "customDefinition": {
            "type": "boolean",
            "description": "True for a custom dimension"
          },
          "deprecatedApiNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "apiName": {
            "type": "string",
            "description": "The name a report request uses"
          },
          "uiName": {
            "type": "string",
            "description": "The name Google Analytics shows"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "The kind of value such as TYPE_INTEGER"
          },
          "expression": {
            "type": "string",
            "description": "The formula of a derived metric"
          },
          "customDefinition": {
            "type": "boolean",
            "description": "True for a custom metric"
          },
          "deprecatedApiNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "blockedReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
```

## Example response

From `examples/google-analytics.properties.metadata.json`.

```json
{
  "name": "properties/123456789/metadata",
  "dimensions": [
    {
      "apiName": "country",
      "uiName": "Country",
      "description": "The country the user activity came from.",
      "category": "Geography",
      "customDefinition": false
    },
    {
      "apiName": "customEvent:levels_unlocked",
      "uiName": "levels_unlocked",
      "description": "A custom event parameter.",
      "category": "Custom",
      "customDefinition": true
    }
  ],
  "metrics": [
    {
      "apiName": "activeUsers",
      "uiName": "Active users",
      "description": "The number of distinct users who visited the site or app.",
      "category": "User",
      "type": "TYPE_INTEGER",
      "customDefinition": false
    },
    {
      "apiName": "eventCount",
      "uiName": "Event count",
      "description": "The number of events.",
      "category": "Event",
      "type": "TYPE_INTEGER",
      "customDefinition": false
    }
  ]
}
```
