{"action":"created","issue":{"url":"https://api.github.com/repos/angulartics/angulartics/issues/473","repository_url":"https://api.github.com/repos/angulartics/angulartics","labels_url":"https://api.github.com/repos/angulartics/angulartics/issues/473/labels{/name}","comments_url":"https://api.github.com/repos/angulartics/angulartics/issues/473/comments","events_url":"https://api.github.com/repos/angulartics/angulartics/issues/473/events","html_url":"https://github.com/angulartics/angulartics/pull/473","id":154040263,"number":473,"title":"enableDirective","user":{"login":"yoavapi","id":1726989,"avatar_url":"https://avatars.githubusercontent.com/u/1726989?v=3","gravatar_id":"","url":"https://api.github.com/users/yoavapi","html_url":"https://github.com/yoavapi","followers_url":"https://api.github.com/users/yoavapi/followers","following_url":"https://api.github.com/users/yoavapi/following{/other_user}","gists_url":"https://api.github.com/users/yoavapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavapi/subscriptions","organizations_url":"https://api.github.com/users/yoavapi/orgs","repos_url":"https://api.github.com/users/yoavapi/repos","events_url":"https://api.github.com/users/yoavapi/events{/privacy}","received_events_url":"https://api.github.com/users/yoavapi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-10T15:45:41Z","updated_at":"2016-05-11T03:17:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angulartics/angulartics/pulls/473","html_url":"https://github.com/angulartics/angulartics/pull/473","diff_url":"https://github.com/angulartics/angulartics/pull/473.diff","patch_url":"https://github.com/angulartics/angulartics/pull/473.patch"},"body":"I've add a way to prevent sending data from the directive (\"analyticsOn\").\r\nshould be used by the provider: \r\n`$analyticsProvider.enableDirective(false);`\r\nor\r\n`$analyticsProvider.enableDirective(true);` (=defaults)"},"comment":{"url":"https://api.github.com/repos/angulartics/angulartics/issues/comments/218351459","html_url":"https://github.com/angulartics/angulartics/pull/473#issuecomment-218351459","issue_url":"https://api.github.com/repos/angulartics/angulartics/issues/473","id":218351459,"user":{"login":"yoavapi","id":1726989,"avatar_url":"https://avatars.githubusercontent.com/u/1726989?v=3","gravatar_id":"","url":"https://api.github.com/users/yoavapi","html_url":"https://github.com/yoavapi","followers_url":"https://api.github.com/users/yoavapi/followers","following_url":"https://api.github.com/users/yoavapi/following{/other_user}","gists_url":"https://api.github.com/users/yoavapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavapi/subscriptions","organizations_url":"https://api.github.com/users/yoavapi/orgs","repos_url":"https://api.github.com/users/yoavapi/repos","events_url":"https://api.github.com/users/yoavapi/events{/privacy}","received_events_url":"https://api.github.com/users/yoavapi/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T03:17:43Z","updated_at":"2016-05-11T03:17:43Z","body":"In my app I use both the $analytics.trackEvent and also via the directive (the \"On\" attribute)\r\n\r\nIn some cases, depending on our system configuration I wish to temporarily disable the use of the \"On\" and just work with the trackEvent way.\r\n\r\nDid I make my self clear?\r\n\r\nDo you see a better way to do it?"}}