Implements the Client Login method to retrieve authentication tokens for Google Data APIs. Requires [dictionary].
Parameters
none
Sample Usage
// get a token via Client Login
var('token' = google_clientlogin(
-Email='foo@foobar.com',
-Passwd='sooperseekrit',
-service='analytics'
));
// create an object to interface with Google Analytics
var('gaData' = google_analyticsDataExport($token));
// get information about your Analytics account
$gaData->getAccountData( -v=2, -prettyprint=true);
// get the ID of a specific site
var('id') = $gaData->getTableIDByTitle('www.foobar.com');
// visits by browser & version for the past 30 days
var('reportData') = $gaData->getReportData(
-ids=$id,
-dimensions='ga:browser,ga:browserVersion',
-metrics='ga:visits',
-sort='-ga:visits',
-startdate=date->subtract( -day=30)&,
-enddate=date,
-prettyprint=true
);
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.