{"action":"created","issue":{"url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/10","repository_url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel","labels_url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/10/comments","events_url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/10/events","html_url":"https://github.com/mooyoul/angulartics-facebook-pixel/issues/10","id":170564393,"number":10,"title":"How to trigger an event from javascript (within controller/directive)","user":{"login":"syrys","id":5236811,"avatar_url":"https://avatars.githubusercontent.com/u/5236811?v=3","gravatar_id":"","url":"https://api.github.com/users/syrys","html_url":"https://github.com/syrys","followers_url":"https://api.github.com/users/syrys/followers","following_url":"https://api.github.com/users/syrys/following{/other_user}","gists_url":"https://api.github.com/users/syrys/gists{/gist_id}","starred_url":"https://api.github.com/users/syrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syrys/subscriptions","organizations_url":"https://api.github.com/users/syrys/orgs","repos_url":"https://api.github.com/users/syrys/repos","events_url":"https://api.github.com/users/syrys/events{/privacy}","received_events_url":"https://api.github.com/users/syrys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-11T03:35:30Z","updated_at":"2016-08-11T03:40:15Z","closed_at":null,"body":"Hi there,\r\n\r\nTrying to figure out how this actually works from within a controller. There is no documentation on this as far as i can see.\r\n\r\nIm wanting to pretty much trigger some Events from within my controller (when user does X, Y, Z action), the controller needs to trigger a `ViewContent` or `Lead` event. How would i go about doing this?\r\n\r\nCheers."},"comment":{"url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/comments/239065296","html_url":"https://github.com/mooyoul/angulartics-facebook-pixel/issues/10#issuecomment-239065296","issue_url":"https://api.github.com/repos/mooyoul/angulartics-facebook-pixel/issues/10","id":239065296,"user":{"login":"syrys","id":5236811,"avatar_url":"https://avatars.githubusercontent.com/u/5236811?v=3","gravatar_id":"","url":"https://api.github.com/users/syrys","html_url":"https://github.com/syrys","followers_url":"https://api.github.com/users/syrys/followers","following_url":"https://api.github.com/users/syrys/following{/other_user}","gists_url":"https://api.github.com/users/syrys/gists{/gist_id}","starred_url":"https://api.github.com/users/syrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syrys/subscriptions","organizations_url":"https://api.github.com/users/syrys/orgs","repos_url":"https://api.github.com/users/syrys/repos","events_url":"https://api.github.com/users/syrys/events{/privacy}","received_events_url":"https://api.github.com/users/syrys/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T03:40:15Z","updated_at":"2016-08-11T03:40:15Z","body":"Just to add\r\n\r\nofcorse from within the controller i could add something like this:\r\n````\r\nif (window.fbq) {\r\n    fbq('track', 'Lead', 'blah');\r\n}\r\n````\r\nBut is this the way it should be done?"}}
{"actor":{"display_login":"syrys"}}