{ "id": "116349", "key": "AC-2469", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2013-06-25T22:34:14.000+0000", "created": "2013-06-21T21:34:10.000+0000", "labels": [ "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:31.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "h3. Steps to Reproduce\r\nsend an 'UA-XXXXX' param to function GAnalytics and use the result into html property of webview (iOS)\r\n\r\nh3. Actual Result\r\nnothing\r\n\r\nh3. Expected Result\r\nhit in google analytics", "attachment": [ { "id": "40154", "filename": ".log", "author": { "name": "fcruz@incopti.com", "key": "fcruz@incopti.com", "displayName": "Francisco Alejandro Cruz Castro", "active": true, "timeZone": "America/Monterrey" }, "created": "2013-06-21T21:34:21.000+0000", "size": 3144245, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "40155", "filename": "diagnostic5241221320631449696.log", "author": { "name": "fcruz@incopti.com", "key": "fcruz@incopti.com", "displayName": "Francisco Alejandro Cruz Castro", "active": true, "timeZone": "America/Monterrey" }, "created": "2013-06-21T21:34:29.000+0000", "size": 5685, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "40156", "filename": "google_analytics.js", "author": { "name": "fcruz@incopti.com", "key": "fcruz@incopti.com", "displayName": "Francisco Alejandro Cruz Castro", "active": true, "timeZone": "America/Monterrey" }, "created": "2013-06-21T21:34:30.000+0000", "size": 677, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "44561", "filename": "Ti.Google.Analytics.js", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-12-12T03:51:08.000+0000", "size": 10349, "mimeType": "text/javascript" } ], "flagged": false, "summary": "iOS: Google Analytics not working in 3.1 or later but work in 3.0", "creator": { "name": "fcruz@incopti.com", "key": "fcruz@incopti.com", "displayName": "Francisco Alejandro Cruz Castro", "active": true, "timeZone": "America/Monterrey" }, "subtasks": [], "reporter": { "name": "fcruz@incopti.com", "key": "fcruz@incopti.com", "displayName": "Francisco Alejandro Cruz Castro", "active": true, "timeZone": "America/Monterrey" }, "environment": "Titanium Studio 3.1.0", "comment": { "comments": [ { "id": "259434", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Francisco,\n\nIs it possible for you to provide a full test case? One that is easily copied and pasted into an app.js that will run and display the problem at hand. This will ensure understanding on both sides and allows us to come to a resolution faster. Also be sure to provide a set of \"steps to reproduce\" that will ensure we are following the same process you are to see the problem in question.\n\nThanks,\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-25T22:31:39.000+0000", "updated": "2013-06-25T22:31:39.000+0000" }, { "id": "283920", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "We tried to reproduce this issue with a sample test case. It’s working as expected with Titanium SDK 3.1.3 GA. Please try the sample code and let us know if the problem persists.\r\n\r\nh5. Testing Environment:\r\nTi CLI 3.3.0\r\nTitanium SDK: 3.1.3.GA \r\niOS simulator 7.0\r\n\r\n\r\n\r\nh5. Test Code\r\n\r\napp.js\r\n{code}\r\n // this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#fff');\r\n\r\nvar gaModule = require('Ti.Google.Analytics');\r\nvar analytics = new gaModule('UA-XXXXXXXXXX');\r\n\r\n// Call the next function if you want to reset the analytics to a new first time visit.\r\n// This is useful for development only and should not go into a production app.\r\n//analytics.reset();\r\n\r\n// The analytics object functions must be called on app.js otherwise it will loose it's context\r\nTi.App.addEventListener('analytics_trackPageview', function(e) {\r\n\tanalytics.trackPageview('/iPad' + e.pageUrl);\r\n});\r\n\r\nTi.App.addEventListener('analytics_trackEvent', function(e) {\r\n\tanalytics.trackEvent(e.category, e.action, e.label, e.value);\r\n});\r\n\r\n// Starts a new session as long as analytics.enabled = true\r\n// Function takes an integer which is the dispatch interval in seconds\r\nanalytics.start(10, true);\r\n\r\n// create tab group\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Ti.UI.createWindow({\r\n\ttitle : 'Tab 1',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\n// track page view on focus\r\nwin1.addEventListener('focus', function(e) {\r\n\tanalytics.trackPageview('/win1');\r\n});\r\n\r\nvar tab1 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_views.png',\r\n\ttitle : 'Tab 1',\r\n\twindow : win1\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor : '#999',\r\n\ttext : 'I am Window 1',\r\n\tfont : {\r\n\t\tfontSize : 20,\r\n\t\tfontFamily : 'Helvetica Neue'\r\n\t},\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\n\r\nwin1.add(label1);\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({\r\n\ttitle : 'Tab 2',\r\n\tbackgroundColor : '#fff'\r\n});\r\n\r\n// track page view on focus\r\nwin2.addEventListener('focus', function(e) {\r\n\tanalytics.trackPageview('/win2');\r\n});\r\n\r\nvar tab2 = Titanium.UI.createTab({\r\n\ticon : 'KS_nav_ui.png',\r\n\ttitle : 'Tab 2',\r\n\twindow : win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor : '#999',\r\n\ttext : 'I am Window 2',\r\n\tfont : {\r\n\t\tfontSize : 20,\r\n\t\tfontFamily : 'Helvetica Neue'\r\n\t},\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n// You don't need to call stop on application close, but this is just to show you can call stop at any time (Basically sets enabled = false)\r\nTitanium.App.addEventListener('close', function(e) {\r\n\tanalytics.stop();\r\n});\r\n\r\n\r\n{code}\r\n \r\n\r\nh5. Steps to Test\r\n\r\n1. Create a new project\r\n2. Update app.js file and analytics ID \r\n4. And run iOS simulator 7.0 \r\n5. Click on tab 2 \r\n6. Open google analytics real time view\r\n\r\nh5. Expected Result \r\n Check your google analytics real time view \r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-12T03:51:08.000+0000", "updated": "2013-12-16T21:00:43.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }