{"action":"created","issue":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/827","repository_url":"https://api.github.com/repos/kriasoft/react-starter-kit","labels_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/827/comments","events_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/827/events","html_url":"https://github.com/kriasoft/react-starter-kit/issues/827","id":174346338,"number":827,"title":"How to make GA(Google analytics) detect changed router when using Link component","user":{"login":"fchienvuhoang","id":4451749,"avatar_url":"https://avatars.githubusercontent.com/u/4451749?v=3","gravatar_id":"","url":"https://api.github.com/users/fchienvuhoang","html_url":"https://github.com/fchienvuhoang","followers_url":"https://api.github.com/users/fchienvuhoang/followers","following_url":"https://api.github.com/users/fchienvuhoang/following{/other_user}","gists_url":"https://api.github.com/users/fchienvuhoang/gists{/gist_id}","starred_url":"https://api.github.com/users/fchienvuhoang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchienvuhoang/subscriptions","organizations_url":"https://api.github.com/users/fchienvuhoang/orgs","repos_url":"https://api.github.com/users/fchienvuhoang/repos","events_url":"https://api.github.com/users/fchienvuhoang/events{/privacy}","received_events_url":"https://api.github.com/users/fchienvuhoang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-31T18:37:48Z","updated_at":"2016-09-01T06:19:44Z","closed_at":null,"body":"Hi all,\r\nI monitors GA module \"Top active pages\", when direct to new router using Link component, GA is not recognize url changed.\r\nThanks"},"comment":{"url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/comments/243986548","html_url":"https://github.com/kriasoft/react-starter-kit/issues/827#issuecomment-243986548","issue_url":"https://api.github.com/repos/kriasoft/react-starter-kit/issues/827","id":243986548,"user":{"login":"fchienvuhoang","id":4451749,"avatar_url":"https://avatars.githubusercontent.com/u/4451749?v=3","gravatar_id":"","url":"https://api.github.com/users/fchienvuhoang","html_url":"https://github.com/fchienvuhoang","followers_url":"https://api.github.com/users/fchienvuhoang/followers","following_url":"https://api.github.com/users/fchienvuhoang/following{/other_user}","gists_url":"https://api.github.com/users/fchienvuhoang/gists{/gist_id}","starred_url":"https://api.github.com/users/fchienvuhoang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchienvuhoang/subscriptions","organizations_url":"https://api.github.com/users/fchienvuhoang/orgs","repos_url":"https://api.github.com/users/fchienvuhoang/repos","events_url":"https://api.github.com/users/fchienvuhoang/events{/privacy}","received_events_url":"https://api.github.com/users/fchienvuhoang/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T06:19:44Z","updated_at":"2016-09-01T06:19:44Z","body":"Hi @langpavel and @frenzzy,\r\nI tried with origin code of react-startkit redux branch.\r\nI added GA code to config file like below:\r\n```\r\nexport const analytics = {\r\n  // https://analytics.google.com/\r\n  google: {\r\n    trackingId: 'UA-81634517-1', // UA-XXXXX-X\r\n  },\r\n};\r\n```\r\nand I tried something else:\r\n```\r\nexport function navigate(descriptor) {\r\n  if (window.ga) {\r\n    window.ga('send', 'pageview');\r\n  }\r\n  return (dispatch, _, { history }) => history.push(descriptor);\r\n}\r\n```\r\n```\r\nexport default {\r\n  path: '/login',\r\n  action() {\r\n    if (window.ga) {\r\n      window.ga('send', 'pageview');\r\n    }\r\n    return <Login />;\r\n  },\r\n};\r\n```\r\n\r\nbut isn't work when monitor on GA. please take a look.\r\nThanks"}}
{"actor":{"display_login":"fchienvuhoang"}}