Skip to content

Commit c5734a8

Browse files
authored
Improved Google Analytics integration (#11484)
- Enhanced Google Analytics API. - Now published as a type with static methods not a module. - Bump version and add Admin API. - Moved the reading logic to Java from Enso. - Add dependency on Standard Table allowing report to be built into a Java Table directly. - New `Google_Credential.new` method. ![image](https://github.com/user-attachments/assets/54e3ad87-045f-4e40-b609-337d827c5d02) - Ability to list accounts for a credential (`Google_Analytics.list_accounts`). ![image](https://github.com/user-attachments/assets/296c6dcc-3b24-43fa-b909-5e74c40d77a1) - Ability to list properties (either for an account or for all) (`Google_Analytics.list_properties`). ![image](https://github.com/user-attachments/assets/e420c824-d08e-48d0-b21c-560b4c7c4809) - Simple object structure of `Google_Analytics_Account`, `Google_Analytics_Property` and `Google_Analytics_Field` with some helper methods. - Widget for `account`, `property` and `credentials`. ![image](https://github.com/user-attachments/assets/221c1450-964d-4fce-af8b-2273aa8739a1) ![image](https://github.com/user-attachments/assets/e1daf1dd-2ade-4c33-875c-4e3cb1544fe6) ![image](https://github.com/user-attachments/assets/cd37b018-4fad-4771-9f48-1448f0076ef9) - Widget for `dimensions` and `metrics` with defaults and then reading from Admin API. ![image](https://github.com/user-attachments/assets/3a4b1d42-9555-499d-90da-04d7586ab4c1) ![image](https://github.com/user-attachments/assets/16efcb11-3547-4eaf-9f28-944fa21c4aa2) - Added widget for `start_date` and `end_date` on `Google_Analytics.read`. - Bug fix for `parse` with auto type by reordering to allow numeric dates to be parsed. - **ToDo**: better exception handling.
1 parent 35e5ed5 commit c5734a8

File tree

180 files changed

+991
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+991
-463
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions

build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ val bouncyCastle = Seq(
586586
// === Google =================================================================
587587
val googleApiClientVersion = "2.2.0"
588588
val googleApiServicesSheetsVersion = "v4-rev612-1.25.0"
589-
val googleAnalyticsDataVersion = "0.44.0"
589+
val googleAnalyticsAdminVersion = "0.62.0"
590+
val googleAnalyticsDataVersion = "0.63.0"
590591

591592
// === Other ==================================================================
592593

@@ -4598,6 +4599,7 @@ lazy val `std-google-api` = project
45984599
libraryDependencies ++= Seq(
45994600
"com.google.api-client" % "google-api-client" % googleApiClientVersion exclude ("com.google.code.findbugs", "jsr305"),
46004601
"com.google.apis" % "google-api-services-sheets" % googleApiServicesSheetsVersion exclude ("com.google.code.findbugs", "jsr305"),
4602+
"com.google.analytics" % "google-analytics-admin" % googleAnalyticsAdminVersion exclude ("com.google.code.findbugs", "jsr305"),
46014603
"com.google.analytics" % "google-analytics-data" % googleAnalyticsDataVersion exclude ("com.google.code.findbugs", "jsr305")
46024604
),
46034605
Compile / packageBin := Def.task {
@@ -4612,6 +4614,7 @@ lazy val `std-google-api` = project
46124614
result
46134615
}.value
46144616
)
4617+
.dependsOn(`std-table` % "provided")
46154618

46164619
lazy val `std-database` = project
46174620
.in(file("std-bits") / "database")

distribution/lib/Standard/Base/0.0.0-dev/src/Metadata.enso

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type Widget
100100

101101
## PRIVATE
102102
make_single_choice : Vector -> Display -> Widget
103-
make_single_choice values display=Display.Always =
103+
make_single_choice values display:Display=..Always =
104104
make_option value = case value of
105105
_ : Vector -> Choice.Option value.first value.second
106106
_ : Text -> Choice.Option value value.pretty

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/NOTICE

Lines changed: 57 additions & 47 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright 2024 Google LLC
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright 2024 Google LLC

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.api.gax-2.39.0/NOTICES renamed to distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.api.gax-2.55.0/NOTICES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
/*
32-
* Copyright 2023 Google LLC
32+
* Copyright 2024 Google LLC
3333
*
3434
* Redistribution and use in source and binary forms, with or without
3535
* modification, are permitted provided that the following conditions are

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.api.gax-grpc-2.39.0/NOTICES

Lines changed: 0 additions & 69 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2+
3+
Copyright 2016 Google LLC
4+
5+
Copyright 2017 Google LLC
6+
7+
Copyright 2018 Google LLC
8+
9+
Copyright 2019 Google LLC
10+
11+
Copyright 2020 Google LLC
12+
13+
Copyright 2021 Google LLC
14+
15+
Copyright 2022 Google LLC
16+
17+
Redistributions of source code must retain the above copyright
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
21+
copyright notice, this list of conditions and the following disclaimer
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
1-
/*
2-
* Copyright 2017 Google LLC
3-
*
4-
* Redistribution and use in source and binary forms, with or without
5-
* modification, are permitted provided that the following conditions are
6-
* met:
7-
*
8-
* * Redistributions of source code must retain the above copyright
9-
* notice, this list of conditions and the following disclaimer.
10-
* * Redistributions in binary form must reproduce the above
11-
* copyright notice, this list of conditions and the following disclaimer
12-
* in the documentation and/or other materials provided with the
13-
* distribution.
14-
* * Neither the name of Google LLC nor the names of its
15-
* contributors may be used to endorse or promote products derived from
16-
* this software without specific prior written permission.
17-
*
18-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29-
*/
30-
311
/*
322
* Copyright 2023 Google LLC
333
*
@@ -58,10 +28,20 @@
5828
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5929
*/
6030

31+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32+
33+
Copyright 2017 Google LLC
34+
6135
Copyright 2018 Google LLC
6236

6337
Copyright 2020 Google LLC
6438

6539
Copyright 2021 Google LLC
6640

6741
Copyright 2022 Google LLC
42+
43+
Redistributions of source code must retain the above copyright
44+
45+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46+
47+
copyright notice, this list of conditions and the following disclaimer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright 2024 Google LLC
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright 2024 Google LLC
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
/*
2-
* Copyright 2023 Google LLC
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
1+
/*
2+
* Copyright 2023 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1515
*/
16+
17+
Copyright 2024 Google LLC

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.api.grpc.proto-google-analytics-data-v1beta-0.44.0/NOTICES

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
17+
Copyright 2024 Google LLC

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.api.grpc.proto-google-common-protos-2.30.0/NOTICES

Lines changed: 0 additions & 15 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright 2024 Google LLC
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@
3232
Copyright 2016, Google Inc. All rights reserved.
3333

3434
Copyright 2022 Google LLC
35+
36+
Copyright 2024 Google LLC
37+
38+
Copyright 2024, Google Inc. All rights reserved.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ Copyright 2022, Google Inc. All rights reserved.
5050
Copyright 2023 Google LLC
5151

5252
Copyright 2023, Google Inc. All rights reserved.
53+
54+
Copyright 2024 Google LLC
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Copyright 2020 Google LLC
1919
Copyright 2021 Google LLC
2020

2121
Copyright 2022 Google LLC
22+
23+
Copyright 2024 Google LLC

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.code.gson.gson-2.10.1/NOTICES renamed to distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.code.gson.gson-2.11.0/NOTICES

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@
3030
* limitations under the License.
3131
*/
3232

33+
/*
34+
* Copyright (C) 2018 Google Inc.
35+
*
36+
* Licensed under the Apache License, Version 2.0 (the "License");
37+
* you may not use this file except in compliance with the License.
38+
* You may obtain a copy of the License at
39+
*
40+
* http://www.apache.org/licenses/LICENSE-2.0
41+
*
42+
* Unless required by applicable law or agreed to in writing, software
43+
* distributed under the License is distributed on an "AS IS" BASIS,
44+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45+
* See the License for the specific language governing permissions and
46+
* limitations under the License.
47+
*/
48+
3349
/*
3450
* Copyright (C) 2021 Google Inc.
3551
*
@@ -54,6 +70,12 @@ Copyright (C) 2012 Google Inc.
5470

5571
Copyright (C) 2014 Google Inc.
5672

73+
Copyright (C) 2015 Google Inc.
74+
5775
Copyright (C) 2018 The Gson authors
5876

5977
Copyright (C) 2020 Google Inc.
78+
79+
Copyright (C) 2022 Google Inc.
80+
81+
Copyright 2008 Google LLC
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Copyright (C) 2020 The Guava Authors
6060

6161
Copyright (C) 2021 The Guava Authors
6262

63+
Copyright (C) 2023 The Guava Authors
64+
65+
Copyright (C) 2024 The Guava Authors
66+
6367
Copyright 2011 Google Inc. All Rights Reserved.
6468

6569
Copyright 2019 The Guava Authors

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/com.google.protobuf.protobuf-java-util-3.25.1/NOTICES

Lines changed: 0 additions & 2 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache Commons Codec
2-
Copyright 2002-2023 The Apache Software Foundation
2+
Copyright 2002-2024 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (https://www.apache.org/).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/**
7-
* Implementation of the MurmurHash2 32-bit and 64-bit hash functions.
7+
* Implements the MurmurHash2 32-bit and 64-bit hash functions.
88
*
99
* <p>MurmurHash is a non-cryptographic hash function suitable for general
1010
* hash-based lookup. The name comes from two basic operations, multiply (MU)
@@ -34,7 +34,7 @@
3434
*/
3535

3636
/**
37-
* Implementation of the MurmurHash3 32-bit and 128-bit hash functions.
37+
* Implements the MurmurHash3 32-bit and 128-bit hash functions.
3838
*
3939
* <p>
4040
* MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/io.grpc.grpc-api-1.60.0/NOTICES renamed to distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/io.grpc.grpc-api-1.67.1/NOTICES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ Copyright 2021 The gRPC Authors
3333
Copyright 2022 The gRPC Authors
3434

3535
Copyright 2023 The gRPC Authors
36+
37+
Copyright 2024 The gRPC Authors

distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/io.grpc.grpc-core-1.60.0/NOTICES renamed to distribution/lib/Standard/Google_Api/0.0.0-dev/THIRD-PARTY/io.grpc.grpc-core-1.67.1/NOTICES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ Copyright 2020 The gRPC Authors
3131
Copyright 2021 The gRPC Authors
3232

3333
Copyright 2023 The gRPC Authors
34+
35+
Copyright 2024 The gRPC Authors

0 commit comments

Comments
 (0)