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.

1

 

Please selecting App to track when you sign in.

2

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.

3

This is all collect data .

4

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