
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
ai.h2o:google-analytics-java
Advanced tools
This is Java API for Google Analytics (Measurement Protocol). More information about the protocol is available at https://developers.google.com/analytics/devguides/collection/protocol/v1/.
Java API for Google Analytics Measurement Protocol (part of Universal Analytics). This library is released under liberal Apache Open source License 2.0
Google Analytics Measurement Protocol is new tracking protocol, which will replace the legacy Tracking protocol. This protocol is documented at https://developers.google.com/analytics/devguides/collection/protocol/v1/
The library is available in Maven Central. Add the following dependency and you are good to go.
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>google-analytics-java</artifactId>
<version>1.1.1</version>
</dependency>
To get a local build, do
git clone https://github.com/brsanthu/google-analytics-java.git
mvn install
View Javadocs here http://brsanthu.github.io/google-analytics-java/javadocs/
This library implements the measurement protocol with following features.
Version 1.1.1 - May 21 2014
Version 1.1.0 - Apr 22 2014
Version 1.0.5 - Apr 09 2014
Version 1.0.4 - Mar 3 2014
Version 1.0.3 - Jan 20 2014
GoogleAnalytics ga = new GoogleAnalytics("UA-12345678-1");
ga.post(new PageViewHit("https://www.google.com", "Google Search"));
Or
GoogleAnalytics ga = new GoogleAnalytics("UA-12345678-1");
ga.postAsync(new PageViewHit("https://www.google.com", "Google Search"));
Or
GoogleAnalytics ga = new GoogleAnalytics("UA-12345678-1");
ga.postAsync(new RequestProvider() {
public GoogleAnalyticsRequest getRequest() {
return new PageViewHit("https://www.google.com", "Google Search");
}
});
There are few Java implementation of Google Analytics api, but found some issues (or protocol mismatch) with each of them.
https://github.com/nhnopensource/universal-analytics-java
https://code.google.com/p/jgoogleanalyticstracker/
https://github.com/siddii/jgoogleanalytics
FAQs
This is Java API for Google Analytics (Measurement Protocol). More information about the protocol is available at https://developers.google.com/analytics/devguides/collection/protocol/v1/.
We found that ai.h2o:google-analytics-java demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.