From 256274cfacb2a705a6dc31db410576f2c55f1de2 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Thu, 21 Apr 2022 12:14:46 +0000 Subject: [PATCH 1/9] updated readme and added sample config --- README.md | 22 +++++++++++++++++++++- config.sample.json | 13 +++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 config.sample.json diff --git a/README.md b/README.md index 9730954..2deedd6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,27 @@ # tap-google-analytics -This tap is currently under development, and incomplete. +This is a [Singer](https://singer.io) tap that produces JSON-formatted data following the [Singer spec](https://github.com/singer-io/getting-started/blob/master/SPEC.md). +How to use it: +- `tap-google-analytics` works together with any other [Singer Target](https://singer.io) to move data from Google Analytics API to any target destination. + +## Configuration + +This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. + +To run `tap-hubspot` with the configuration file, use this command: + +```bash +› tap-google-analytics -c my-config.json +``` + + +## Service Account Authentication (for development) + +Service accounts are useful for automated, offline, or scheduled access to Google Analytics data for your own account. For example, to build a live dashboard of your own Google Analytics data and share it with other users. +See the [Google Analytics Service Accounts](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#service_accounts) section for more information on how to set up the service account. + +To use an API key, include a `private_key` and `client_email` configuration variables in your `config.json` and set it to the value of your credentials. --- Copyright © 2019 Stitch diff --git a/config.sample.json b/config.sample.json new file mode 100644 index 0000000..a0d7f20 --- /dev/null +++ b/config.sample.json @@ -0,0 +1,13 @@ +{ + "start_date": "2021-11-22T00:00:00Z", + "report_definitions": [ + { + "id": "report_id", + "name": "Report Name" + } + ], + "refresh_token": "my_token", + "client_id": "client_id", + "client_secret": "client_secret", + "auth_method": "oauth2" +} \ No newline at end of file From 2ec89c93da1a9ec6621359484cdafda2c953d749 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Thu, 21 Apr 2022 12:20:04 +0000 Subject: [PATCH 2/9] added discover and sync mode details --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2deedd6..b08f982 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,17 @@ How to use it: This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. -To run `tap-hubspot` with the configuration file, use this command: +To run the discover mode of `tap-google-analytics` with the configuration file, use this command: ```bash -› tap-google-analytics -c my-config.json +$ tap-google-analytics -c my-config.json -d ``` +To run he sync mode of `tap-google-analytics` with the catalog file, use the command: + +```bash +$ tap-google-analytics -c my-config.json --catalog catalog.json +``` ## Service Account Authentication (for development) From d6d48c64a6beb1a0234cfd11082e548c7e6fe0be Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Thu, 21 Apr 2022 12:21:21 +0000 Subject: [PATCH 3/9] removed the 'for dev' word --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b08f982..b4448cb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To run he sync mode of `tap-google-analytics` with the catalog file, use the com $ tap-google-analytics -c my-config.json --catalog catalog.json ``` -## Service Account Authentication (for development) +## Service Account Authentication Service accounts are useful for automated, offline, or scheduled access to Google Analytics data for your own account. For example, to build a live dashboard of your own Google Analytics data and share it with other users. See the [Google Analytics Service Accounts](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#service_accounts) section for more information on how to set up the service account. From a59405bafbcf6290646cbe33e537b5b3a4e81012 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Thu, 21 Apr 2022 12:33:18 +0000 Subject: [PATCH 4/9] added mor specific details regarding auth --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4448cb..9aed2a3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ How to use it: ## Configuration -This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls collection of anonymous usage metrics. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. +This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls the method of authentication. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. To run the discover mode of `tap-google-analytics` with the configuration file, use this command: From b74d9045c0978790899e8d4359e50901303e343a Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Mon, 25 Apr 2022 16:05:40 +0000 Subject: [PATCH 5/9] updated endpoints --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9aed2a3..f076d39 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,13 @@ This is a [Singer](https://singer.io) tap that produces JSON-formatted data foll How to use it: - `tap-google-analytics` works together with any other [Singer Target](https://singer.io) to move data from Google Analytics API to any target destination. - +- Extracts the following pre-made and any self-made reports from [Google Analytics Reporting API](https://developers.google.com/analytics/devguides/reporting/core/v4/rest/v4/reports/batchGet): + - Audience Overview + - Audience Geo Location + - Audience Technology + - Acquisition Overview + - Behavior Overview + - Ecommerce Overview ## Configuration This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls the method of authentication. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. From 98168e6477bcf6bd82a8c86d8d77d966d7c74e22 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Tue, 3 May 2022 09:49:18 +0000 Subject: [PATCH 6/9] updated fornatting --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f076d39..f595853 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Service accounts are useful for automated, offline, or scheduled access to Googl See the [Google Analytics Service Accounts](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#service_accounts) section for more information on how to set up the service account. To use an API key, include a `private_key` and `client_email` configuration variables in your `config.json` and set it to the value of your credentials. + --- Copyright © 2019 Stitch From fe0b06000030819837e620911d80668065980cb7 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Mon, 9 May 2022 13:46:59 +0000 Subject: [PATCH 7/9] fixed the typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f595853..b271590 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To run the discover mode of `tap-google-analytics` with the configuration file, $ tap-google-analytics -c my-config.json -d ``` -To run he sync mode of `tap-google-analytics` with the catalog file, use the command: +To run the sync mode of `tap-google-analytics` with the catalog file, use the command: ```bash $ tap-google-analytics -c my-config.json --catalog catalog.json From 67af3f286045573498438a925dcb1c1dced06b13 Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Tue, 10 May 2022 15:07:41 +0000 Subject: [PATCH 8/9] added bookmarking in readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b271590..968e02e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ How to use it: - Acquisition Overview - Behavior Overview - Ecommerce Overview + +## Bookmarking Strategy + +The Analytics API reports supports the `start_date` and `end_date` parameter that limits the query to only return analytics records within the date period. + ## Configuration This tap requires a `config.json` which specifies details regarding [OAuth 2.0](https://developers.google.com/analytics/devguides/reporting/core/v4/authorization#OAuth2Authorizing) authentication, a cutoff date for syncing historical data, and an optional flag which controls the method of authentication. See [config.sample.json](config.sample.json) for an example. You may specify an API key instead of OAuth parameters for development purposes, as detailed below. From f3460fdd004f59bb725bc7cd9ef8a854f6f0883c Mon Sep 17 00:00:00 2001 From: namrata270998 Date: Wed, 1 Jun 2022 12:43:06 +0000 Subject: [PATCH 9/9] added field exclusion note in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 968e02e..2eb2aef 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ How to use it: - Behavior Overview - Ecommerce Overview +NOTE: For pre-made reports, the field selection must adhere to the google-analytics' field exclusion rule. Hence, certain dimensions and metrics cannot be queried together. For more information on the same, please refer: https://ga-dev-tools.web.app/dimensions-metrics-explorer/. + ## Bookmarking Strategy The Analytics API reports supports the `start_date` and `end_date` parameter that limits the query to only return analytics records within the date period.