Mxpanel.track_later
You're seeing just the function
track_later
, go back to Mxpanel module for more information.
Specs
track_later(Mxpanel.Batcher.name(), Mxpanel.Event.t()) :: :ok
Enqueues the event. The event will be store in a buffer and sent in batches to mixpanel.
Mxpanel.Batcher.start_link(name: MyApp.MxpanelBatcher, token: "mixpanel project token")
event = Mxpanel.Event.new("signup", "123")
Mxpanel.track_later(MyApp.MxpanelBatcher, event)
Why use it?
HTTP requests to the Mixpanel API often take time and may fail. If you are tracking events during a web request, you probably, don't want to make your users wait the extra time for the mixpanel API call to finish.
Checkout Mxpanel.Batcher
for more information.