Documentation
¶
Overview ¶
Package mixpanel is an unofficial Go client library for the services provided by MixPanel
Index ¶
- type Client
- func (m *Client) Engage(distinctID string, props Properties, op *Operation) error
- func (m *Client) EngageAsScript(distinctID string, props Properties, op *Operation) error
- func (m *Client) RedirectURL(distinctID, event, uri string, props Properties) (string, error)
- func (m *Client) Track(distinctID string, event string, props Properties) error
- func (m *Client) TrackAsScript(distinctID string, event string, props Properties) error
- func (m *Client) TrackingPixel(distinctID, event string, props Properties) (string, error)
- type Operation
- type Properties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a client to talk to the API
func (*Client) Engage ¶
func (m *Client) Engage(distinctID string, props Properties, op *Operation) error
Engage updates profile data. This will update the IP and related data on the profile. If you don't have the IP address of the user, then use the UpdateProperties method instead, otherwise the user's location will be set to wherever the script was run from.
func (*Client) EngageAsScript ¶
func (m *Client) EngageAsScript(distinctID string, props Properties, op *Operation) error
EngageAsScript calls the engage endpoint, but doesn't set IP, city, country, on the profile.
func (*Client) RedirectURL ¶
func (m *Client) RedirectURL(distinctID, event, uri string, props Properties) (string, error)
RedirectURL returns a url that, when clicked, will track the given data and then redirect to provided url.
func (*Client) Track ¶
func (m *Client) Track(distinctID string, event string, props Properties) error
Track sends event data with optional metadata.
func (*Client) TrackAsScript ¶
func (m *Client) TrackAsScript(distinctID string, event string, props Properties) error
TrackAsScript sends event data on behalf of a specific user, without using the current IP address for location determination.
func (*Client) TrackingPixel ¶
func (m *Client) TrackingPixel(distinctID, event string, props Properties) (string, error)
TrackingPixel returns a url that, when clicked, will track the given data and then redirect to provided url.
type Operation ¶
type Operation struct {
Name string
Values Properties
}
Operation is an action performed on a user profile. Typically this is $set or $unset, but others are available.
type Properties ¶
type Properties map[string]interface{}
Properties are key=value pairs that decorate an event or a profile.
