{"action":"created","issue":{"url":"https://api.github.com/repos/SOASTA/boomerang/issues/85","repository_url":"https://api.github.com/repos/SOASTA/boomerang","labels_url":"https://api.github.com/repos/SOASTA/boomerang/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/SOASTA/boomerang/issues/85/comments","events_url":"https://api.github.com/repos/SOASTA/boomerang/issues/85/events","html_url":"https://github.com/SOASTA/boomerang/issues/85","id":152710377,"number":85,"title":"boomerangJS for SPA with AngularJS - is it stable/working?","user":{"login":"luckykurhe","id":1836471,"avatar_url":"https://avatars.githubusercontent.com/u/1836471?v=3","gravatar_id":"","url":"https://api.github.com/users/luckykurhe","html_url":"https://github.com/luckykurhe","followers_url":"https://api.github.com/users/luckykurhe/followers","following_url":"https://api.github.com/users/luckykurhe/following{/other_user}","gists_url":"https://api.github.com/users/luckykurhe/gists{/gist_id}","starred_url":"https://api.github.com/users/luckykurhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luckykurhe/subscriptions","organizations_url":"https://api.github.com/users/luckykurhe/orgs","repos_url":"https://api.github.com/users/luckykurhe/repos","events_url":"https://api.github.com/users/luckykurhe/events{/privacy}","received_events_url":"https://api.github.com/users/luckykurhe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-03T06:44:02Z","updated_at":"2016-05-19T06:43:22Z","closed_at":"2016-05-16T14:28:33Z","body":"I am trying to use boomerangJS for SPA built using AngularJS\r\n\r\n`using plugins: plugins/rt.js plugins/navtiming.js plugins/auto_xhr.js plugins/spa.js plugins/angular.js`\r\n\r\nwith init\r\n\r\n```\r\nBOOMR.init({\r\n    beacon_url: 'http://myValidDomaincom/test.gif',\r\n    autorun: false,\r\n    instrument_xhr: false\r\n  });\r\n```\r\n\r\nAngular plugin is hooked using below code:\r\n```\r\n.run(['$rootScope', function($rootScope) {\r\nvar hadRouteChange = false;\r\n$rootScope.$on(\"$routeChangeStart\", function() {\r\n    hadRouteChange = true;\r\n});\r\n\r\nfunction hookAngularBoomerang() {\r\n    if (window.BOOMR && BOOMR.version) {\r\n        if (BOOMR.plugins && BOOMR.plugins.Angular) {\r\n            BOOMR.plugins.Angular.hook($rootScope, hadRouteChange);\r\n        }\r\n        return true;\r\n    }\r\n}\r\n\r\nif (!hookAngularBoomerang()) {\r\n    if (document.addEventListener) {\r\n        document.addEventListener(\"onBoomerangLoaded\", hookAngularBoomerang);\r\n    } else if (document.attachEvent) {\r\n        document.attachEvent(\"onpropertychange\", function(e) {\r\n            e = e || window.event;\r\n            if (e && e.propertyName === \"onBoomerangLoaded\") {\r\n                hookAngularBoomerang();\r\n            }\r\n        });\r\n    }\r\n}\r\n}])\r\n```\r\n\r\nAnd when first time page is loaded I trigger `BOOMR.page_ready();` using JS\r\n\r\nNow when I go through the flow which loads different views, I don't see any new beacons getting triggered\r\n\r\n- Which function triggers a new beacon, after route change?\r\n- Will boomerang trigger new beacons each time a new view is displayed on page ?\r\n- Am I missing any configuration or code, to get it working ?\r\n- or do I need to execute any more code from boomerang after routeChangeStart ?\r\n\r\ndebugging:\r\non page where I have included these boomerangJS, I can see (in dev console)\r\n- BOOMR.plugins.AutoXHR, BOOMR.plugins.SPA, BOOMR.plugins.Angular are valid objects\r\n- hookAngularBoomerang() from Angular .run hook also executed\r\n- boomerang debug logs @https://gist.github.com/luckykurhe/87f9c00991dd0797d31f6e6dbabb66c9"},"comment":{"url":"https://api.github.com/repos/SOASTA/boomerang/issues/comments/220240756","html_url":"https://github.com/SOASTA/boomerang/issues/85#issuecomment-220240756","issue_url":"https://api.github.com/repos/SOASTA/boomerang/issues/85","id":220240756,"user":{"login":"luckykurhe","id":1836471,"avatar_url":"https://avatars.githubusercontent.com/u/1836471?v=3","gravatar_id":"","url":"https://api.github.com/users/luckykurhe","html_url":"https://github.com/luckykurhe","followers_url":"https://api.github.com/users/luckykurhe/followers","following_url":"https://api.github.com/users/luckykurhe/following{/other_user}","gists_url":"https://api.github.com/users/luckykurhe/gists{/gist_id}","starred_url":"https://api.github.com/users/luckykurhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luckykurhe/subscriptions","organizations_url":"https://api.github.com/users/luckykurhe/orgs","repos_url":"https://api.github.com/users/luckykurhe/repos","events_url":"https://api.github.com/users/luckykurhe/events{/privacy}","received_events_url":"https://api.github.com/users/luckykurhe/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T06:43:22Z","updated_at":"2016-05-19T06:43:22Z","body":"In brief, for first beacon: if its scenario\r\n#.1 page navTiming data is lost (most of the params), but spaView t_done is gives correct time\r\n#.2 page navTiming data is collected (most of the params), but t_done is not correct\r\nis it correct? and if yes should be handled/considered accordingly while analyzing data\r\n@nicjansma ^^"}}