{"action":"created","issue":{"url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/91","repository_url":"https://api.github.com/repos/amplitude/Amplitude-Javascript","labels_url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/91/comments","events_url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/91/events","html_url":"https://github.com/amplitude/Amplitude-Javascript/issues/91","id":174127971,"number":91,"title":"Batching + callback?","user":{"login":"rhagigi","id":1672482,"avatar_url":"https://avatars.githubusercontent.com/u/1672482?v=3","gravatar_id":"","url":"https://api.github.com/users/rhagigi","html_url":"https://github.com/rhagigi","followers_url":"https://api.github.com/users/rhagigi/followers","following_url":"https://api.github.com/users/rhagigi/following{/other_user}","gists_url":"https://api.github.com/users/rhagigi/gists{/gist_id}","starred_url":"https://api.github.com/users/rhagigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhagigi/subscriptions","organizations_url":"https://api.github.com/users/rhagigi/orgs","repos_url":"https://api.github.com/users/rhagigi/repos","events_url":"https://api.github.com/users/rhagigi/events{/privacy}","received_events_url":"https://api.github.com/users/rhagigi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-30T21:15:31Z","updated_at":"2016-08-30T22:20:38Z","closed_at":"2016-08-30T22:20:29Z","body":"The documentation is pretty clear that `In the case that batchEvents is true, if the batch requirements eventUploadThreshold and eventUploadPeriodMillis are not met when logEvent is called, then no request is sent, but the callback is still called` -- however I want to ask if there is *any* way to get around that and force-send the request? \r\n\r\nIn general for the events on my app itself, I want to batch my events for the user maneuvering around the app, etc -- but if they tap an external link, I need to send the request to amplitude to log that event (and ideally any other batched events)  and wait for the callback before setting the new `window.location`. Is there any way to make this work? My apologies if I missed something in the documentation..."},"comment":{"url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/comments/243600104","html_url":"https://github.com/amplitude/Amplitude-Javascript/issues/91#issuecomment-243600104","issue_url":"https://api.github.com/repos/amplitude/Amplitude-Javascript/issues/91","id":243600104,"user":{"login":"rhagigi","id":1672482,"avatar_url":"https://avatars.githubusercontent.com/u/1672482?v=3","gravatar_id":"","url":"https://api.github.com/users/rhagigi","html_url":"https://github.com/rhagigi","followers_url":"https://api.github.com/users/rhagigi/followers","following_url":"https://api.github.com/users/rhagigi/following{/other_user}","gists_url":"https://api.github.com/users/rhagigi/gists{/gist_id}","starred_url":"https://api.github.com/users/rhagigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhagigi/subscriptions","organizations_url":"https://api.github.com/users/rhagigi/orgs","repos_url":"https://api.github.com/users/rhagigi/repos","events_url":"https://api.github.com/users/rhagigi/events{/privacy}","received_events_url":"https://api.github.com/users/rhagigi/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T22:20:38Z","updated_at":"2016-08-30T22:20:38Z","body":"Thanks!\n\nOn Tue, Aug 30, 2016, 6:19 PM Daniel Jih <notifications@github.com> wrote:\n\n> @rhagigi <https://github.com/rhagigi> we have a sendEvents method, that\n> isn't publicly exposed in the documentation (maybe it should be public):\n> https://github.com/amplitude/Amplitude-Javascript/blob/master/src/amplitude-client.js#L984-L1054.\n> Feel free to call that to manually force the sending of the request. It\n> also accepts a callback function.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/amplitude/Amplitude-Javascript/issues/91#issuecomment-243599908>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABmFIoO7vzhdxzgDiZEhajCODJAcLHyaks5qlKyFgaJpZM4Jw_GY>\n> .\n>\n"}}
{"actor":{"display_login":"rhagigi"}}