WGX Logo WGX library

Architecture - Reference Manual - Guides

Web Analytics API

Functions

BOOL __stdcall IncreaseGoogleAnalyticsCounter (char *hostname, char *path, char *account)
 Increases a Google Analytics counter by sending the request directly to the service.
void __stdcall IncreaseGoogleAnalyticsCounterAsynch (char *hostname, char *path, char *account)
 An asynchronous equivalent of IncreaseGoogleAnalyticsCounter.

Function Documentation

BOOL __stdcall IncreaseGoogleAnalyticsCounter ( char *  hostname,
char *  path,
char *  account 
)

Increases a Google Analytics counter by sending the request directly to the service.

Parameters:
[in] hostname the name of the host.
[in] path the relative path of the page.
[in] account the account string.
Returns:
Boolean value indicating the status of the operation. TRUE means success, FALSE - failure.
Note:
This function is designed especially to collect statistics about the use of the program, or about the frequency of some error, or about similar things through Google Analytics service.

How it works. It sends a request to Google Analytics service as described here: http://code.google.com/apis/analytics/docs/ (see Troubleshooting section). Thus it translates the frequency of some event inside your application to the frequency of an access to some predefined webpage. Therefore you will have a handy nice looking report of application events frequencies. And moreover, it will represent statistics globally, collected from all instances of the program.

It is not supposed to increase counters of your website though! If you'll try to use it for illegal purposes, remember - you are forewarned and we have no responsibility for your illegal actions.

Example 1:
 // collect statistics about the UltraDefrag GUI client use
 IncreaseGoogleAnalyticsCounter("ultradefrag.sourceforge.net","/appstat/gui.html","UA-15890458-1");
Example 2:
 if(cannot_define_windows_version){
     // collect statistics about this error frequency
     IncreaseGoogleAnalyticsCounter("ultradefrag.sourceforge.net","/appstat/errors/winver.html","UA-15890458-1");
 }

Definition at line 218 of file web-analytics.c.

void __stdcall IncreaseGoogleAnalyticsCounterAsynch ( char *  hostname,
char *  path,
char *  account 
)

An asynchronous equivalent of IncreaseGoogleAnalyticsCounter.

Note:
Runs in a separate thread.

Definition at line 228 of file web-analytics.c.


Generated on Sat May 29 23:06:45 2010 for WGX by doxygen 1.6.2