Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9928] MobileWeb: Analytics: Need to set: Ti.Platform.id Ti.App.guid Ti.App.deployType Ti.App.sessionId

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-12-21T05:30:44.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-14 Core, Release 2.1.1, Release 3.0.0
ComponentsMobileWeb
Labelsn/a
ReporterLokesh Choudhary
AssigneeChris Barber
Created2012-07-10T14:31:51.000+0000
Updated2012-12-21T05:30:44.000+0000

Description

MobileWeb : We are not getting any analytics events for mobileweb in browsers. Environment Tested on : Tested On: Titanium studio : 2.1.0.201206251749 SDK version : 2.1.0. GA Chrome Browser : 20.0.1132.47 Firefox Browser : 13.0.1 Ticloud : 2.1.0 Steps to Reproduce: 1. Make a default app in the studio. 2. Copy the contents from "/Users/user-name/Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.1.0/examples" to resources. 3. Publish it for mobile web production. 4. Type in the url to where you are hosting the mobile web app. 5. Go to "my.appcelerator.com" & sign in with your credentials. 6. Go to 'My apps'. 7. Click on 'manage ACS' link against the app you published,where you can check whether users,photo collections etc are getting created from the app. 8. Now execute various events like create users, emails ,photo collections etc in the app. 9. Wait till the analytics cron job has been run. 10.Now click on 'view analytics' link next to your app in 'my.appcelerator.com'. Actual Result: 1. We do not see any ACS analytics events. Expected Result: 1. We should be able to see the ACS analytics events.

Attachments

FileDateSize
app.js2012-07-10T21:59:10.000+00001835
Screen Shot 2012-07-10 at 2.56.11 PM.png2012-07-10T15:01:31.000+0000139795

Comments

  1. Chung Liu 2012-07-10

    Lokesh, what is the GUID of the app?
  2. Lokesh Choudhary 2012-07-10

    Hi chung the guid is 034448cf-d605-4d29-81b2-71d795f99bae .
  3. Chung Liu 2012-07-10

    Raw events don't include any ACS events. root@ip-10-92-58-173:/mnt/mysqltmp/2012-07-09-raw-mobile# grep 034448cf-d605-4d29-81b2-71d795f99bae * {"id":"27811A4B-621E-4C36-A9DB-A1E01A07547B","mid":"634293E4-CE5E-48C2-8FD3-C9B90B40F378","rdu":null,"type":"ti.enroll","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"5F0FF8C6-14F9-4EC9-9B67-DE08ADFADF49","ts":"2012-07-09T21:45:08.691+0000","data":"{\"app_name\":\"ACS_prod_test\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko\/20100101 Firefox\/13.0.1\"}"} {"city":"Mountain View","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.397399902344,"longitude":-122.07319641113,"area_code":650,"continent_code":"NA","ip_address":"38.99.10.124","region_name":"California","id":"9A0190EE-990C-4F03-B142-E778C66F6079","mid":"634293E4-CE5E-48C2-8FD3-C9B90B40F378","rdu":null,"type":"ti.start","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.start","seq":1,"ver":"2","deploytype":"production","sid":"5F0FF8C6-14F9-4EC9-9B67-DE08ADFADF49","ts":"2012-07-09T21:45:08.693+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"MacIntel\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko\/20100101 Firefox\/13.0.1\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"id":"C4BC4AC7-9EB7-4845-AB8D-065C4A9854AA","mid":"77C2DE8D-D73C-44BC-B741-DF7374C9E68C","rdu":null,"type":"ti.enroll","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"6F9E467E-CC70-4F62-9E06-5EEA58B2D0DE","ts":"2012-07-09T22:31:30.438+0000","data":"{\"app_name\":\"ACS_prod_test\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit\/534.54.16 (KHTML, like Gecko) Version\/5.1.4 Safari\/534.54.16\"}"} {"id":"2293F397-73AD-4CA0-A0A1-6155DC6FFD7F","mid":"634293E4-CE5E-48C2-8FD3-C9B90B40F378","rdu":null,"type":"ti.end","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.end","seq":0,"ver":"2","deploytype":"production","sid":"13D83487-073C-458B-AF8E-D838B9D44471","ts":"2012-07-09T22:34:07.448+0000"} {"city":"Mountain View","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.397399902344,"longitude":-122.07319641113,"area_code":650,"continent_code":"NA","ip_address":"38.99.10.124","region_name":"California","id":"144F39C4-8DC4-45EA-804B-3E0FCE0EBD4A","mid":"634293E4-CE5E-48C2-8FD3-C9B90B40F378","rdu":null,"type":"ti.start","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.start","seq":0,"ver":"2","deploytype":"production","sid":"B9BCC08A-6430-4EEC-B6F6-98592554B078","ts":"2012-07-09T22:34:09.141+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"MacIntel\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko\/20100101 Firefox\/13.0.1\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"id":"9B0B487B-0554-4D51-B307-8C0705B62DA3","mid":"89D7FFA6-F8C5-45C4-B73E-9F39203BE538","rdu":null,"type":"ti.enroll","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"84D4E78D-DF95-4A2C-BDFA-C75F2759276C","ts":"2012-07-09T21:37:49.916+0000","data":"{\"app_name\":\"ACS_prod_test\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit\/536.11 (KHTML, like Gecko) Chrome\/20.0.1132.47 Safari\/536.11\"}"} {"city":"Mountain View","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.397399902344,"longitude":-122.07319641113,"area_code":650,"continent_code":"NA","ip_address":"38.99.10.124","region_name":"California","id":"9C2DDD66-B7A2-4EE3-AFE8-D93017AD5422","mid":"89D7FFA6-F8C5-45C4-B73E-9F39203BE538","rdu":null,"type":"ti.start","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.start","seq":1,"ver":"2","deploytype":"production","sid":"84D4E78D-DF95-4A2C-BDFA-C75F2759276C","ts":"2012-07-09T21:37:49.921+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"MacIntel\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit\/536.11 (KHTML, like Gecko) Chrome\/20.0.1132.47 Safari\/536.11\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"id":"1837EB80-18C6-4385-A653-6D0A8E2915A3","mid":"89D7FFA6-F8C5-45C4-B73E-9F39203BE538","rdu":null,"type":"ti.end","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.end","seq":0,"ver":"2","deploytype":"production","sid":"4CC93D0C-E194-4C1E-8DB3-8B11A0206E3B","ts":"2012-07-09T22:43:47.359+0000"} {"city":"Mountain View","region_code":"CA","country_code":"US","country_name":"United States","postal_code":"","latitude":37.397399902344,"longitude":-122.07319641113,"area_code":650,"continent_code":"NA","ip_address":"38.99.10.124","region_name":"California","id":"55F0C480-3541-49AC-B648-7CF9FF92CD0D","mid":"89D7FFA6-F8C5-45C4-B73E-9F39203BE538","rdu":null,"type":"ti.start","aguid":"034448cf-d605-4d29-81b2-71d795f99bae","event":"ti.start","seq":0,"ver":"2","deploytype":"production","sid":"99EE0879-9739-489E-833C-D5F029EB2E61","ts":"2012-07-09T22:43:49.771+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"MacIntel\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit\/536.11 (KHTML, like Gecko) Chrome\/20.0.1132.47 Safari\/536.11\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} root@ip-10-92-58-173:/mnt/mysqltmp/2012-07-09-raw-mobile#
  4. Chung Liu 2012-07-10

    From https://github.com/appcelerator-modules/ti.cloud/blob/master/commonjs/src/ti.cloud.js
       
       function injectAnalytics(data, url) {
               if (Ti.App.analytics) {
                   var obj = data.analytics || {};
                   obj.id = Ti.Platform.createUUID();
                   if (Ti.Platform.id) {
                       obj.mid = Ti.Platform.id;
                   }
                   obj.aguid = Ti.App.guid;
                   obj.event = 'cloud.' + url.replace(/\//g, '.').replace(/\.json/, '');
                   obj.deploytype = Ti.App.deployType || 'development';
                   obj.sid = Ti.App.sessionId;
                   data['ti_analytics'] = JSON.stringify(obj);
               }
           }
       
       
    Need to set: Ti.Platform.id Ti.App.guid Ti.App.deployType Ti.App.sessionId
  5. Chris Barber 2012-07-10

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2535
  6. Bryan Hughes 2012-07-12

    2.1.1 backport PR: https://github.com/appcelerator/titanium_mobile/pull/2550

JSON Source