Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

Java Implementation for Google Analytics Measurement Protocol

This post will introduces Java Implementation for Measurement Protocol

The Measurement Protocol is part of Universal Analytics(UA),which allows developers to make HTTP requests to send raw user interaction data directly to Google Analytics servers.

First,you must have an account in Google Analytics.



Please selecting App to track when you sign in.


After above setting,we have gotten a Tracking ID (UA-XXXXXXX-X).

Now we will use Measurement Protocol java API to collect data and send to UA.

GoogleAnalytic analytic = new GoogleAnalytic("nGrinder","1.1.0","UA-XXXXXX-X");
analytic.sendStaticDataToUA("statics_data_runTests", dataValue);
analytic.sendStaticDataToUA("statics_data_runTests", dataValue);


Because of "Time Delay" Problems,you'd better to wait some times and then observe statistic data later in Google Analytic.

From Real-Time, active users number is being displayed.


This is all collect data .


comments powered by Disqus
문서 정보
viewed 1147 times
번역 en
posted 작년
마지막 수정시간 3달 전
변경 내역 보기
Share this article