Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 API Manager can be configured to track run time runtime statistics for of API invocations through Google Analytics (http://www.google.com/analytics). Google analytics Analytics is a service which allows you to track vists visits to a web site website and generate detailed statistics based on that.

This guide explains how to setup API Manager in order to feed runtime statistics for summarization and display to Google analytics.

1. Setup a Google analytics account.
If you already have a google account, Sign-In. Else Create a New Google Account and Sign-In.
Then go to http://www.google.com/analytics/ and Sign-In
Click on the Admin Icon on top right
Then Click Create New Account as highlighted in below image.http://java-wisdom.blogspot.com/2012/12/google-analytics-tracking-for-wso2-api.htmlAnalytics account if not subscribed already and receive a Tracking ID, which is of the format "UA-XXXXXXXX-X". A Tracking ID is issued at the time an account is created with Google Analytics.

2. Open $AM_HOME/repository/conf/api-manager.xml. Enable the <GoogleAnalyticsTracking> element and enter the Tracking-ID.

Code Block
languagehtml/xml
<GoogleAnalyticsTracking>
   <!-- Enable/Disable Google Analytics Tracking -->
   <Enabled>false</Enabled>
   <!-- Google Analytics Tracking ID -->
   <TrackingID>UA-XXXXXXXX-X</TrackingID>
</GoogleAnalyticsTracking>

3. Save the file and restart the API Manager instance.