Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metric class in Analytics Reporting API v4 (Java)

I am trying to make this example work https://developers.google.com/analytics/devguides/reporting/core/v4/samples#dimensions_and_metrics but I can't seem to find the right "Metric" Java library, the only Metric class I can find is "org.springframework.data.geo.Metric" and it is not the right one as it has nothing to do with the metrics in the Analytics Reporting API v4. Any help?

like image 522
Chayma Atallah Avatar asked Mar 03 '26 06:03

Chayma Atallah


1 Answers

You need to download and install the Analytics Reporting API V4 Java Client Library.

See the Google APIs java client library for details.

GRADLE:

Add the following to your build.gradle file:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.apis:google-api-services-analyticsreporting:v4-rev1-1.21.0'
}

MAVEN

Add the following to your pom.xml file:

<project>
  <dependencies>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-analyticsreporting</artifactId>
      <version>v4-rev1-1.21.0</version>
    </dependency>
  </dependencies>
</project>
like image 173
Matt Avatar answered Mar 04 '26 19:03

Matt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!