{"action":"created","issue":{"url":"https://api.github.com/repos/react-ga/react-ga/issues/278","repository_url":"https://api.github.com/repos/react-ga/react-ga","labels_url":"https://api.github.com/repos/react-ga/react-ga/issues/278/labels{/name}","comments_url":"https://api.github.com/repos/react-ga/react-ga/issues/278/comments","events_url":"https://api.github.com/repos/react-ga/react-ga/issues/278/events","html_url":"https://github.com/react-ga/react-ga/issues/278","id":344925660,"node_id":"MDU6SXNzdWUzNDQ5MjU2NjA=","number":278,"title":"Multiple react GA instances with react SSR after opening new tab","user":{"login":"horaceleung","id":16663831,"node_id":"MDQ6VXNlcjE2NjYzODMx","avatar_url":"https://avatars3.githubusercontent.com/u/16663831?v=4","gravatar_id":"","url":"https://api.github.com/users/horaceleung","html_url":"https://github.com/horaceleung","followers_url":"https://api.github.com/users/horaceleung/followers","following_url":"https://api.github.com/users/horaceleung/following{/other_user}","gists_url":"https://api.github.com/users/horaceleung/gists{/gist_id}","starred_url":"https://api.github.com/users/horaceleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horaceleung/subscriptions","organizations_url":"https://api.github.com/users/horaceleung/orgs","repos_url":"https://api.github.com/users/horaceleung/repos","events_url":"https://api.github.com/users/horaceleung/events{/privacy}","received_events_url":"https://api.github.com/users/horaceleung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-26T16:56:53Z","updated_at":"2018-08-01T20:50:16Z","closed_at":null,"author_association":"NONE","body":"Not sure if this has been flagged up before but we noticed that when a new tab is opened, within that tab it causes a new GA tag to created inside <head> whenever user navigates to a new page or click on an action.\r\n\r\nI believe the normal behaviour is that there should only be one instance of GA? This causes some inaccurate data within google analytics dashboard but I am not sure if this is an issue with our implementation, or with react-ga.\r\n\r\nAppreciate if anyone has experienced this before can shed some light.\r\n\r\n<img width=\"887\" alt=\"screen shot 2018-07-20 at 10 06 41 am\" src=\"https://user-images.githubusercontent.com/16663831/43276637-4507bb34-90fd-11e8-9804-9dad5826ce53.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/react-ga/react-ga/issues/comments/409718089","html_url":"https://github.com/react-ga/react-ga/issues/278#issuecomment-409718089","issue_url":"https://api.github.com/repos/react-ga/react-ga/issues/278","id":409718089,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTcxODA4OQ==","user":{"login":"Drapegnik","id":11758660,"node_id":"MDQ6VXNlcjExNzU4NjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11758660?v=4","gravatar_id":"","url":"https://api.github.com/users/Drapegnik","html_url":"https://github.com/Drapegnik","followers_url":"https://api.github.com/users/Drapegnik/followers","following_url":"https://api.github.com/users/Drapegnik/following{/other_user}","gists_url":"https://api.github.com/users/Drapegnik/gists{/gist_id}","starred_url":"https://api.github.com/users/Drapegnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drapegnik/subscriptions","organizations_url":"https://api.github.com/users/Drapegnik/orgs","repos_url":"https://api.github.com/users/Drapegnik/repos","events_url":"https://api.github.com/users/Drapegnik/events{/privacy}","received_events_url":"https://api.github.com/users/Drapegnik/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T20:50:16Z","updated_at":"2018-08-01T20:50:16Z","author_association":"NONE","body":"I fixed it with:\r\n```js\r\nif (!window.ga) {\r\n\tReactGA.initialize(...)\r\n}\r\n```"}}
{"actor":{"display_login":"Drapegnik"}}