* Source Google Analytics (Universal Analytics): specify date format in spec * Update changelog * Specify pattern in spec to pass CAT * Update spec to support previous date format * Leave validation only for YYYY-MM-DD dates, as the only valid option
170 lines
6.1 KiB
JSON
170 lines
6.1 KiB
JSON
{
|
|
"documentationUrl": "https://docs.airbyte.com/integrations/sources/google-analytics-v4",
|
|
"connectionSpecification": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Google Analytics (V4) Spec",
|
|
"type": "object",
|
|
"required": ["view_id", "start_date"],
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"credentials": {
|
|
"order": 0,
|
|
"type": "object",
|
|
"title": "Credentials",
|
|
"description": "Credentials for the service",
|
|
"oneOf": [
|
|
{
|
|
"title": "Authenticate via Google (Oauth)",
|
|
"type": "object",
|
|
"required": ["client_id", "client_secret", "refresh_token"],
|
|
"properties": {
|
|
"auth_type": {
|
|
"type": "string",
|
|
"const": "Client",
|
|
"order": 0
|
|
},
|
|
"client_id": {
|
|
"title": "Client ID",
|
|
"type": "string",
|
|
"description": "The Client ID of your Google Analytics developer application.",
|
|
"airbyte_secret": true,
|
|
"order": 1
|
|
},
|
|
"client_secret": {
|
|
"title": "Client Secret",
|
|
"type": "string",
|
|
"description": "The Client Secret of your Google Analytics developer application.",
|
|
"airbyte_secret": true,
|
|
"order": 2
|
|
},
|
|
"refresh_token": {
|
|
"title": "Refresh Token",
|
|
"type": "string",
|
|
"description": "The token for obtaining a new access token.",
|
|
"airbyte_secret": true,
|
|
"order": 3
|
|
},
|
|
"access_token": {
|
|
"title": "Access Token",
|
|
"type": "string",
|
|
"description": "Access Token for making authenticated requests.",
|
|
"airbyte_secret": true,
|
|
"order": 4
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"title": "Service Account Key Authentication",
|
|
"required": ["credentials_json"],
|
|
"properties": {
|
|
"auth_type": {
|
|
"type": "string",
|
|
"const": "Service",
|
|
"order": 0
|
|
},
|
|
"credentials_json": {
|
|
"title": "Service Account JSON Key",
|
|
"type": "string",
|
|
"description": "The JSON key of the service account to use for authorization",
|
|
"examples": [
|
|
"{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }"
|
|
],
|
|
"airbyte_secret": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"start_date": {
|
|
"order": 1,
|
|
"type": "string",
|
|
"title": "Replication Start Date",
|
|
"description": "The date in the format YYYY-MM-DD. Any data before this date will not be replicated.",
|
|
"examples": ["2020-06-01"],
|
|
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$|^$|[\\s\\S]+$",
|
|
"format": "date"
|
|
},
|
|
"view_id": {
|
|
"order": 2,
|
|
"type": "string",
|
|
"title": "View ID",
|
|
"description": "The ID for the Google Analytics View you want to fetch data from. This can be found from the <a href=\"https://ga-dev-tools.appspot.com/account-explorer/\">Google Analytics Account Explorer</a>."
|
|
},
|
|
"custom_reports": {
|
|
"order": 3,
|
|
"type": "string",
|
|
"title": "Custom Reports",
|
|
"description": "A JSON array describing the custom reports you want to sync from Google Analytics. See <a href=\"https://docs.airbyte.com/integrations/sources/google-analytics-v4#data-processing-latency\">the docs</a> for more information about the exact format you can use to fill out this field."
|
|
},
|
|
"window_in_days": {
|
|
"type": "integer",
|
|
"title": "Data request time increment in days",
|
|
"description": "The time increment used by the connector when requesting data from the Google Analytics API. More information is available in the <a href=\"https://docs.airbyte.com/integrations/sources/google-analytics-v4/#sampling-in-reports\">the docs</a>. The bigger this value is, the faster the sync will be, but the more likely that sampling will be applied to your data, potentially causing inaccuracies in the returned results. We recommend setting this to 1 unless you have a hard requirement to make the sync faster at the expense of accuracy. The minimum allowed value for this field is 1, and the maximum is 364. ",
|
|
"examples": [30, 60, 90, 120, 200, 364],
|
|
"default": 1,
|
|
"order": 4
|
|
}
|
|
}
|
|
},
|
|
"advanced_auth": {
|
|
"auth_flow_type": "oauth2.0",
|
|
"predicate_key": [
|
|
"credentials",
|
|
"auth_type"
|
|
],
|
|
"predicate_value": "Client",
|
|
"oauth_config_specification": {
|
|
"complete_oauth_output_specification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"path_in_connector_config": [
|
|
"credentials",
|
|
"access_token"
|
|
]
|
|
},
|
|
"refresh_token": {
|
|
"type": "string",
|
|
"path_in_connector_config": [
|
|
"credentials",
|
|
"refresh_token"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"complete_oauth_server_input_specification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"complete_oauth_server_output_specification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"client_id": {
|
|
"type": "string",
|
|
"path_in_connector_config": [
|
|
"credentials",
|
|
"client_id"
|
|
]
|
|
},
|
|
"client_secret": {
|
|
"type": "string",
|
|
"path_in_connector_config": [
|
|
"credentials",
|
|
"client_secret"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|