google-analytics-data overview (0.35.0)

com.google.analytics.data.v1alpha

A client to Google Analytics Data API

The interfaces provided are listed below, along with usage samples.

AlphaAnalyticsDataClient

Service Description: Google Analytics reporting data service.

Sample for AlphaAnalyticsDataClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
   RunFunnelReportRequest request =
       RunFunnelReportRequest.newBuilder()
           .setProperty("property-993141291")
           .addAllDateRanges(new ArrayList<DateRange>())
           .setFunnel(Funnel.newBuilder().build())
           .setFunnelBreakdown(FunnelBreakdown.newBuilder().build())
           .setFunnelNextAction(FunnelNextAction.newBuilder().build())
           .addAllSegments(new ArrayList<Segment>())
           .setLimit(102976443)
           .setDimensionFilter(FilterExpression.newBuilder().build())
           .setReturnPropertyQuota(true)
           .build();
   RunFunnelReportResponse response = alphaAnalyticsDataClient.runFunnelReport(request);
 }
 

com.google.analytics.data.v1alpha.stub

com.google.analytics.data.v1beta

A client to Google Analytics Data API

The interfaces provided are listed below, along with usage samples.

BetaAnalyticsDataClient

Service Description: Google Analytics reporting data service.

Sample for BetaAnalyticsDataClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
   RunReportRequest request =
       RunReportRequest.newBuilder()
           .setProperty("property-993141291")
           .addAllDimensions(new ArrayList<Dimension>())
           .addAllMetrics(new ArrayList<Metric>())
           .addAllDateRanges(new ArrayList<DateRange>())
           .setDimensionFilter(FilterExpression.newBuilder().build())
           .setMetricFilter(FilterExpression.newBuilder().build())
           .setOffset(-1019779949)
           .setLimit(102976443)
           .addAllMetricAggregations(new ArrayList<MetricAggregation>())
           .addAllOrderBys(new ArrayList<OrderBy>())
           .setCurrencyCode("currencyCode1004773790")
           .setCohortSpec(CohortSpec.newBuilder().build())
           .setKeepEmptyRows(true)
           .setReturnPropertyQuota(true)
           .build();
   RunReportResponse response = betaAnalyticsDataClient.runReport(request);
 }
 

com.google.analytics.data.v1beta.stub