{"action":"created","issue":{"url":"https://api.github.com/repos/ankane/ahoy/issues/199","repository_url":"https://api.github.com/repos/ankane/ahoy","labels_url":"https://api.github.com/repos/ankane/ahoy/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/ankane/ahoy/issues/199/comments","events_url":"https://api.github.com/repos/ankane/ahoy/issues/199/events","html_url":"https://github.com/ankane/ahoy/issues/199","id":166735766,"number":199,"title":"duplicate click events","user":{"login":"jhuangtw-dev","id":888205,"avatar_url":"https://avatars.githubusercontent.com/u/888205?v=3","gravatar_id":"","url":"https://api.github.com/users/jhuangtw-dev","html_url":"https://github.com/jhuangtw-dev","followers_url":"https://api.github.com/users/jhuangtw-dev/followers","following_url":"https://api.github.com/users/jhuangtw-dev/following{/other_user}","gists_url":"https://api.github.com/users/jhuangtw-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jhuangtw-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhuangtw-dev/subscriptions","organizations_url":"https://api.github.com/users/jhuangtw-dev/orgs","repos_url":"https://api.github.com/users/jhuangtw-dev/repos","events_url":"https://api.github.com/users/jhuangtw-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jhuangtw-dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-21T04:37:33Z","updated_at":"2016-07-21T06:18:08Z","closed_at":null,"body":"Hi all,\r\nI'm in the middle of setting up ahoy with our Rails app and observing some strangeness in browser console; not sure if it's related to turbolink or the way we're calling ahoy.trackClicks().\r\n\r\nour setup:\r\n- rails 4.2.6 with turbolink\r\n- Ahoy.track_visits_immediately = true\r\n- ahoy.js included as README described\r\n- in our page body, we call ahoy.trackClicks() and ahoy.trackView() where we call other trackers like GA.\r\n\r\nsymptom:\r\nviews seem to track fine, but clicks seem to to get repeated with each incremental action.\r\neg:\r\nfirst click would log 1 click.\r\nsecond click would log 2 clicks.\r\nthird click would log 3 clicks ... and so on.\r\nthe duplicated click events would all be on the previous clicked-on DOM element, as if the onclick callback is being called multiple times.\r\n\r\nany help appreciated!"},"comment":{"url":"https://api.github.com/repos/ankane/ahoy/issues/comments/234166565","html_url":"https://github.com/ankane/ahoy/issues/199#issuecomment-234166565","issue_url":"https://api.github.com/repos/ankane/ahoy/issues/199","id":234166565,"user":{"login":"jhuangtw-dev","id":888205,"avatar_url":"https://avatars.githubusercontent.com/u/888205?v=3","gravatar_id":"","url":"https://api.github.com/users/jhuangtw-dev","html_url":"https://github.com/jhuangtw-dev","followers_url":"https://api.github.com/users/jhuangtw-dev/followers","following_url":"https://api.github.com/users/jhuangtw-dev/following{/other_user}","gists_url":"https://api.github.com/users/jhuangtw-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jhuangtw-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhuangtw-dev/subscriptions","organizations_url":"https://api.github.com/users/jhuangtw-dev/orgs","repos_url":"https://api.github.com/users/jhuangtw-dev/repos","events_url":"https://api.github.com/users/jhuangtw-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jhuangtw-dev/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T06:18:08Z","updated_at":"2016-07-21T06:18:08Z","body":"answering my own question here: most likely turbolink. since the partial i had that was calling trackClicks() was being called more than once while the other document hasn't changed, looks like the onClick() events were getting added and causing duplicate tracking calls firing."}}
{"actor":{"display_login":"jhuangtw-dev"}}