Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9927] MobileWeb analytics: backslashes in the "data" portion of the analytics data

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

Description

MobileWeb : ACS analytics - We are not getting any analytics events for browsers in mobile devices. Environment Tested on : Tested On: Titanium studio : 2.1.0.201206251749 SDK version : 2.1.0. GA Chrome Browser : 20.0.1132.47 Iphone 4 - iOS 5.0.1 (safari browser) Android 2.2.3 - default browser 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 on the devices. 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 browser. 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
Screen Shot 2012-07-10 at 2.55.07 PM.png2012-07-10T15:04:04.000+0000142997

Comments

  1. Chung Liu 2012-07-10

    Lokesh, what is the GUID of app that you are using to test?
  2. Lokesh Choudhary 2012-07-10

    Hi chung the guid is 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 .
  3. Chung Liu 2012-07-10

    Raw events from 7/9: root@ip-10-92-58-173:/mnt/mysqltmp/2012-07-09-raw-mobile# grep 3742c9d1 combined {"id":"CBAACFD8-7FF1-4DF6-96E0-7D19DFDBBC00","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.enroll","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"28318426-24B3-4820-9CC2-A3C5B3A464EB","ts":"2012-07-10T00:03:26.857+0000","data":"{\"app_name\":\"ACS_prod_test_mob\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs_mob\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Linux; U; Android 2.2.3; en-us; Droid Build\/FRK76) AppleWebKit\/533.1 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/533.1\"}"} {"id":"499474F3-E644-4965-A4A5-3C65E68A2E4B","mid":"97F255E2-AA3B-486B-8BFE-6E7430792E51","rdu":null,"type":"ti.enroll","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"F7AAD919-CA55-4FA7-8689-62C65C0A3975","ts":"2012-07-10T00:03:21.624+0000","data":"{\"app_name\":\"ACS_prod_test_mob\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs_mob\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit\/534.46 (KHTML, like Gecko) Version\/5.1 Mobile\/9A405 Safari\/7534.48.3\"}"} {"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":"9C831A17-B7B2-4DB7-B53B-0D2DB8232CF1","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.start","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.start","seq":1,"ver":"2","deploytype":"production","sid":"28318426-24B3-4820-9CC2-A3C5B3A464EB","ts":"2012-07-10T00:03:27.081+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"Linux armv7l\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Linux; U; Android 2.2.3; en-us; Droid Build\/FRK76) AppleWebKit\/533.1 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/533.1\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"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":"0BAA1044-51F3-4F64-B2E0-2DC6BD4863FF","mid":"97F255E2-AA3B-486B-8BFE-6E7430792E51","rdu":null,"type":"ti.start","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.start","seq":1,"ver":"2","deploytype":"production","sid":"F7AAD919-CA55-4FA7-8689-62C65C0A3975","ts":"2012-07-10T00:03:21.637+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"iPhone\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit\/534.46 (KHTML, like Gecko) Version\/5.1 Mobile\/9A405 Safari\/7534.48.3\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"id":"1C9AF84A-D1C9-4BE0-B9C8-2DA8D3F7D290","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.end","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.end","seq":2,"ver":"2","deploytype":"production","sid":"28318426-24B3-4820-9CC2-A3C5B3A464EB","ts":"2012-07-10T00:36:02.854+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":"91A54B0E-0733-4539-A4D0-3FA67CA1BAE4","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.start","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.start","seq":0,"ver":"2","deploytype":"production","sid":"0C75DE35-3CA1-4207-BA04-F53E6712F6C3","ts":"2012-07-10T00:36:10.330+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"Linux armv7l\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Linux; U; Android 2.2.3; en-us; Droid Build\/FRK76) AppleWebKit\/533.1 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/533.1\",\"un\":null,\"app_version\":\"1.0\",\"nettype\":null}"} {"id":"1C9AF84A-D1C9-4BE0-B9C8-2DA8D3F7D290","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.end","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.end","seq":1,"ver":"2","deploytype":"production","sid":"0C75DE35-3CA1-4207-BA04-F53E6712F6C3","ts":"2012-07-10T00:36:02.854+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":"91A54B0E-0733-4539-A4D0-3FA67CA1BAE4","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.start","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.start","seq":0,"ver":"2","deploytype":"production","sid":"125D97FD-398E-4828-8835-85E13C318DE6","ts":"2012-07-10T00:36:10.330+0000","data":"{\"tz\":420,\"deploytype\":\"production\",\"os\":\"mobileweb\",\"osver\":\"Linux armv7l\",\"version\":\"2.1.0.GA\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Linux; U; Android 2.2.3; en-us; Droid Build\/FRK76) AppleWebKit\/533.1 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/533.1\",\"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

    load file from 7/9. Ronen: notice that the platform is "android" even though the raw even says "mobileweb". mysql> select * from tmp_mobile_session_events where app_guid="3742c9d1-b341-4b67-9068-0ec2fd5de4c0"; +------------+------------+------------+---------+-------+-----------+--------+------+--------------------------------------+---------------------+---------------------+----------+---------+---------------+-------------+--------------------------------------+-------------+----------+------------+----------+--------------------------------------+-------------+-----------+------------+----+--------+---------+--------+-------+-----------+-------------+-------+-------+--------------+----------+ | day | event_type | event_name | context | csub1 | csub1sub2 | origin | dest | sess_guid | sess_start | sess_end | sess_len | country | city | region_code | app_guid | app_version | app_name | app_id_str | platform | device_id | phone_model | simulator | ti_version | os | ostype | osver | osarch | oscpu | sesslat | sesslng | evlat | evlng | sess_evt_cnt | has_data | +------------+------------+------------+---------+-------+-----------+--------+------+--------------------------------------+---------------------+---------------------+----------+---------+---------------+-------------+--------------------------------------+-------------+----------+------------+----------+--------------------------------------+-------------+-----------+------------+----+--------+---------+--------+-------+-----------+-------------+-------+-------+--------------+----------+ | 2012-07-09 | ti.start | ti.start | | | | | | 125D97FD-398E-4828-8835-85E13C318DE6 | 2012-07-09 17:36:10 | NULL | 0 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 1 | 0 | | 2012-07-09 | ti.start | ti.start | | | | | | 0C75DE35-3CA1-4207-BA04-F53E6712F6C3 | 2012-07-09 17:36:10 | NULL | 0 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 2 | 0 | | 2012-07-09 | ti.end | ti.end | | | | | | 0C75DE35-3CA1-4207-BA04-F53E6712F6C3 | 2012-07-09 17:36:10 | NULL | 0 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 0 | 0 | | 2012-07-09 | ti.end | ti.end | | | | | | 28318426-24B3-4820-9CC2-A3C5B3A464EB | 2012-07-09 17:03:27 | 2012-07-09 17:36:02 | 1956 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 0 | 0 | | 2012-07-09 | ti.start | ti.start | | | | | | 28318426-24B3-4820-9CC2-A3C5B3A464EB | 2012-07-09 17:03:27 | 2012-07-09 17:36:02 | 1956 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 3 | 0 | | 2012-07-09 | ti.enroll | ti.enroll | | | | | | 28318426-24B3-4820-9CC2-A3C5B3A464EB | 2012-07-09 17:03:27 | 2012-07-09 17:36:02 | 1956 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | F4EC3217-6948-409D-87AD-BC63F4781ECF | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 0 | 0 | | 2012-07-09 | ti.start | ti.start | | | | | | F7AAD919-CA55-4FA7-8689-62C65C0A3975 | 2012-07-09 17:03:21 | NULL | 0 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | 97F255E2-AA3B-486B-8BFE-6E7430792E51 | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 2 | 0 | | 2012-07-09 | ti.enroll | ti.enroll | | | | | | F7AAD919-CA55-4FA7-8689-62C65C0A3975 | 2012-07-09 17:03:21 | NULL | 0 | US | Mountain View | CA | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | 97F255E2-AA3B-486B-8BFE-6E7430792E51 | | 0 | | | | unknown | | | 37.397400 | -122.073196 | NULL | NULL | 0 | 0 | +------------+------------+------------+---------+-------+-----------+--------+------+--------------------------------------+---------------------+---------------------+----------+---------+---------------+-------------+--------------------------------------+-------------+----------+------------+----------+--------------------------------------+-------------+-----------+------------+----+--------+---------+--------+-------+-----------+-------------+-------+-------+--------------+----------+ 8 rows in set (0.17 sec)
  5. Chung Liu 2012-07-10

    No installs and no sessions, even though there are rows in the load file. mysql> select * from anly_mob_appinst_dim where mob_guid="3742c9d1-b341-4b67-9068-0ec2fd5de4c0"; +--------+--------------------------------------+----------+-----------+-------------+----------+----------------+---------------+ | id | mob_guid | app_name | appid_str | app_version | platform | creator_userid | creator_email | +--------+--------------------------------------+----------+-----------+-------------+----------+----------------+---------------+ | 106631 | 3742c9d1-b341-4b67-9068-0ec2fd5de4c0 | | | | android | NULL | NULL | +--------+--------------------------------------+----------+-----------+-------------+----------+----------------+---------------+ 1 row in set (0.00 sec) mysql> select * from anly_mobinst_f where appdim_id=106631; Empty set (0.00 sec) mysql> select * from anly_time_dim where day='2012-07-09'; +-------+------------+------------------+------------------+---------------------+---------------------+--------------------+---------------------+------------+------------+----------------------+---------+---------------+------+ | id | day | text_day_of_week | sort_day_of_week | day_number_in_month | week_number_in_year | day_number_overall | week_number_overall | text_month | sort_month | month_number_overall | quarter | fiscal_period | year | +-------+------------+------------------+------------------+---------------------+---------------------+--------------------+---------------------+------------+------------+----------------------+---------+---------------+------+ | 12851 | 2012-07-09 | Monday | 1 | 9 | 28 | 1286 | 185 | July | 7 | NULL | 3 | 3 | 2012 | +-------+------------+------------------+------------------+---------------------+---------------------+--------------------+---------------------+------------+------------+----------------------+---------+---------------+------+ 1 row in set (0.00 sec) mysql> select * from anly_mobsess_f where appdim_id=106631 and timedim_id=12851; Empty set (0.00 sec)
  6. Chung Liu 2012-07-10

    Oh, I see what's going on. The data inside JSON is being backslashed, so it's not valid JSON. There should not be backslashes. {"id":"CBAACFD8-7FF1-4DF6-96E0-7D19DFDBBC00","mid":"F4EC3217-6948-409D-87AD-BC63F4781ECF","rdu":null,"type":"ti.enroll","aguid":"3742c9d1-b341-4b67-9068-0ec2fd5de4c0","event":"ti.enroll","seq":0,"ver":"2","deploytype":"production","sid":"28318426-24B3-4820-9CC2-A3C5B3A464EB","ts":"2012-07-10T00:03:26.857+0000","data":"{\"app_name\":\"ACS_prod_test_mob\",\"oscpu\":1,\"mac_addr\":null,\"deploytype\":\"production\",\"ostype\":\"mobileweb\",\"osarch\":null,\"app_id\":\"com.appcelerator.acs_mob\",\"platform\":\"mobileweb\",\"model\":\"Mozilla\/5.0 (Linux; U; Android 2.2.3; en-us; Droid Build\/FRK76) AppleWebKit\/533.1 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/533.1\"}"}
  7. Chris Barber 2012-07-10

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

    2.1.1 backport PR: https://github.com/appcelerator/titanium_mobile/pull/2550
  9. Lokesh Choudhary 2012-07-24

    Verified the issue & there are no black slashes in the data portion anymore. Tested On: Titanium studio : 2.1.1.201207171343 SDK version : 2.1.1.v20120723131610 Thus closing the issue.

JSON Source