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?
You need to download and install the Analytics Reporting API V4 Java Client Library.
See the Google APIs java client library for details.
Add the following to your build.gradle file:
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.apis:google-api-services-analyticsreporting:v4-rev1-1.21.0'
}
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With