Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 86568d1

Browse files
ikuleshovparthea
andauthored
docs: updates the properties_run_access_report sample to return aggregated data instead of individual data access records (#298)
* update test configuration * remove custom noxfile configs for now * remove MaximumUserAccess rom sample * add comment in noxfile_config.py * run blacken session * lint * add pytest * Update noxfile_config.py * Update noxfile_config.py * delete enhanced measurement settings samples as this functionality is no longer supported in v1alpha * fix the samples tests * do not use the `maximum_user_access` field and `update` operation in properties.firebase_links tests as this is no longer supported in v1alpha * use `creator_email_address` instead of `email_address` field in properties.google_ads_links_list() test as the field has been renamed in v1alpha * fix the samples test * docs: updates the `properties_run_access_report` sample to return aggregated data instead of individual data access records * docs: updates the `properties_run_access_report` sample to return aggregated data instead of individual data access records Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9881c02 commit 86568d1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

samples/properties_run_access_report.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
"""Google Analytics Admin API sample application which runs an access report
1818
on a property.
19-
2019
See https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties/runAccessReport
2120
for more information.
2221
"""
@@ -42,7 +41,13 @@ def run_sample():
4241

4342
def run_access_report(property_id: str, transport: str = None):
4443
"""
45-
Runs an access report for a Google Analytics property.
44+
Runs an access report for a Google Analytics property. The report will
45+
aggregate over dimensions `userEmail`, `accessedPropertyId`,
46+
`propertyUserLink`, `reportType`, `revenueDataReturned`, `costDataReturned`,
47+
`userIP`, and return the access count, as well as the most recent access
48+
time for each combination.
49+
See https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema
50+
for the description of each field used in a data access report query.
4651
Args:
4752
property_id(str): The Google Analytics Property ID.
4853
transport(str): The transport to use. For example, "grpc"
@@ -59,7 +64,6 @@ def run_access_report(property_id: str, transport: str = None):
5964
AccessDimension(dimension_name="revenueDataReturned"),
6065
AccessDimension(dimension_name="costDataReturned"),
6166
AccessDimension(dimension_name="userIP"),
62-
AccessDimension(dimension_name="epochTimeMicros"),
6367
AccessDimension(dimension_name="mostRecentAccessEpochTimeMicros"),
6468
],
6569
metrics=[AccessMetric(metric_name="accessCount")],

0 commit comments

Comments
 (0)