{"action":"opened","issue":{"url":"https://api.github.com/repos/webcomponents/beta/issues/728","repository_url":"https://api.github.com/repos/webcomponents/beta","labels_url":"https://api.github.com/repos/webcomponents/beta/issues/728/labels{/name}","comments_url":"https://api.github.com/repos/webcomponents/beta/issues/728/comments","events_url":"https://api.github.com/repos/webcomponents/beta/issues/728/events","html_url":"https://github.com/webcomponents/beta/issues/728","id":196296064,"number":728,"title":"\"Take me back\" has no effect when google-analytics.js blocked","user":{"login":"tony19","id":26580,"avatar_url":"https://avatars.githubusercontent.com/u/26580?v=3","gravatar_id":"","url":"https://api.github.com/users/tony19","html_url":"https://github.com/tony19","followers_url":"https://api.github.com/users/tony19/followers","following_url":"https://api.github.com/users/tony19/following{/other_user}","gists_url":"https://api.github.com/users/tony19/gists{/gist_id}","starred_url":"https://api.github.com/users/tony19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tony19/subscriptions","organizations_url":"https://api.github.com/users/tony19/orgs","repos_url":"https://api.github.com/users/tony19/repos","events_url":"https://api.github.com/users/tony19/events{/privacy}","received_events_url":"https://api.github.com/users/tony19/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-18T20:03:30Z","updated_at":"2016-12-18T20:03:30Z","closed_at":null,"body":"My ad blocker blocks `google-analytics.js`, which somehow prevents the redirect toast's \"Take me back\" button from working. There is no log in the console when this occurs. DevTools shows that the only thing \"ad-blocked\" on this site is `google-analytics.js`. Manually adding an exception (or disabling the ad-blocker for this page) allows the link to return me to the classic Polymer Elements catalog.\r\n\r\nThe relevant [code](https://github.com/webcomponents/beta/blob/dc57a3b/client/src/catalog-app.html#L755-L760):\r\n```javascript\r\n      _optOut: function() {\r\n        function navigate() {\r\n          window.location.href = 'https://elements.polymer-project.org?redirect=';\r\n        }\r\n        /* global ga */\r\n        if (window.ga) {\r\n          ga('send', 'event', {\r\n            eventCategory: 'Optout',\r\n            eventAction: 'Toast',\r\n            eventLabel: 'Polymer Elements redirect',\r\n            transport: 'beacon',\r\n            hitCallback: navigate,\r\n          });\r\n        } else {\r\n          navigate();\r\n        }\r\n      },\r\n```\r\n\r\nI'm guessing that `window.ga` exists even when blocked, but since it's blocked, `hitCallback` is never invoked, so `navigate()` never gets called.\r\n\r\n### Environment\r\n\r\n * macOS Sierra 10.12\r\n * Chrome 54\r\n * [AdBlock](https://chrome.google.com/webstore/detail/adblock/gighmmpiobklfepjocnamgkkbiglidom?hl=en-US) 3.8.1\r\n"}}
{"actor":{"display_login":"tony19"}}