Hi I am trying to integrate the Google Analytics but I am not able to find any analytics data that shows on the Google Analytics Account of mine. I am using the link mention
Well the above code given in the Question works well. All you need to do is after setting your code and adding the Jar file Download Google Analytics Jar file to your Lib. just wait for 24 to 48 hours. and it would show all the events and analytic for the App you had registered.
Once You had Created your Google Analytic account and Downloaded the Jar file, Add the Jar file in your lib folder of your Application
Google Analytic Implementation:-
Well For Analytic Part You Just need the analytic.xml file to be included in your values folder which is mentioned in the Question.
Then define private EasyTracker easyTracker = null; in your MainActivity.
And now in your onCreate(Bundle savedInstanceState) method just write the following lines of Code. Well you can also write the following code for any Listners e.g. on any Button Click.
/*
*For Google Analytics...
*/
easyTracker = EasyTracker.getInstance(MainActivity.this); // It Tracks your Activity...
easyTracker.send(MapBuilder.createEvent("SomeValue(StoryPage)",
"SomeMoreValue(AuthorName) , "SomeMoreValueAgain(StoryTitle)", null).build()); //This line creates the event for keeping logs and other Analytical stuffs concerned to this Activity of Application...
//In the above example we had Tracked the session for the MainActivity and also Analysed how many time this activity was opened, which Author story and which Story was read.
Now in your onStart() Method, just write the following code, it starts the Tracking and Analytics session for your Activity.
EasyTracker.getInstance(this).activityStart(this);
And now in your onStop() Method, just write the following code, it will close or stop the Tracking session for this activity.
EasyTracker.getInstance(this).activityStop(this);
Now you are able to Track and Analysis your Application and Activities in It.