Skip to content

Commit

Permalink
Merge pull request #8 from joaolsilva/master
Browse files Browse the repository at this point in the history
User agent for Android
  • Loading branch information
rogchap committed Oct 31, 2011
2 parents edc3718 + 33aa3fa commit 23604f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/analytics.js
Expand Up @@ -103,6 +103,9 @@ var Analytics = AnalyticsBase.extend({

//Constructor: var analytics = new Analytics('UA-XXXXXXX-X');
init: function(accountId){
if(Ti.Platform.osname === 'android') {
this._USER_AGENT = 'GoogleAnalytics/1.0 (Linux; U; Android ' + Titanium.Platform.version + '; ' + Titanium.Locale.currentLocale + '; ' + Titanium.Platform.model + ')';
}
this._accountId = accountId;
this._db = Titanium.Database.open('analytics');
this._initialize_db();
Expand Down Expand Up @@ -319,4 +322,4 @@ StringBuilder.prototype.clear = function (){
// Converts this instance to a String.
StringBuilder.prototype.toString = function (){
return this.strings.join('');
};
};

0 comments on commit 23604f1

Please sign in to comment.