Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update javascript-full-api-reference.md #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scott-marinoff
Copy link

Corrected JS formatting for "mixpanel.set_config" section. Missing commas were messing up the formatting.

Corrected JS formatting for "mixpanel.set_config" section. Missing commas were messing up the formatting.
@tdumitrescu
Copy link
Member

Thanks. This needs to be updated in the source, not the generated file:

* The default config is:
*
* {
* // host for requests (customizable for e.g. a local proxy)
* api_host: 'https://api-js.mixpanel.com',
*
* // endpoints for different types of requests
* api_routes: {
* track: 'track/',
* engage: 'engage/',
* groups: 'groups/',
* }
*
* // HTTP method for tracking requests
* api_method: 'POST'
*
* // transport for sending requests ('XHR' or 'sendBeacon')
* // NB: sendBeacon should only be used for scenarios such as
* // page unload where a "best-effort" attempt to send is
* // acceptable; the sendBeacon API does not support callbacks
* // or any way to know the result of the request. Mixpanel
* // tracking via sendBeacon will not support any event-
* // batching or retry mechanisms.
* api_transport: 'XHR'
*
* // request-batching/queueing/retry
* batch_requests: true,
*
* // maximum number of events/updates to send in a single
* // network request
* batch_size: 50,
*
* // milliseconds to wait between sending batch requests
* batch_flush_interval_ms: 5000,
*
* // milliseconds to wait for network responses to batch requests
* // before they are considered timed-out and retried
* batch_request_timeout_ms: 90000,
*
* // override value for cookie domain, only useful for ensuring
* // correct cross-subdomain cookies on unusual domains like
* // subdomain.mainsite.avocat.fr; NB this cannot be used to
* // set cookies on a different domain than the current origin
* cookie_domain: ''
*
* // super properties cookie expiration (in days)
* cookie_expiration: 365
*
* // if true, cookie will be set with SameSite=None; Secure
* // this is only useful in special situations, like embedded
* // 3rd-party iframes that set up a Mixpanel instance
* cross_site_cookie: false
*
* // super properties span subdomains
* cross_subdomain_cookie: true
*
* // debug mode
* debug: false
*
* // if this is true, the mixpanel cookie or localStorage entry
* // will be deleted, and no user persistence will take place
* disable_persistence: false
*
* // if this is true, Mixpanel will automatically determine
* // City, Region and Country data using the IP address of
* //the client
* ip: true
*
* // opt users out of tracking by this Mixpanel instance by default
* opt_out_tracking_by_default: false
*
* // opt users out of browser data storage by this Mixpanel instance by default
* opt_out_persistence_by_default: false
*
* // persistence mechanism used by opt-in/opt-out methods - cookie
* // or localStorage - falls back to cookie if localStorage is unavailable
* opt_out_tracking_persistence_type: 'localStorage'
*
* // customize the name of cookie/localStorage set by opt-in/opt-out methods
* opt_out_tracking_cookie_prefix: null
*
* // type of persistent store for super properties (cookie/
* // localStorage) if set to 'localStorage', any existing
* // mixpanel cookie value with the same persistence_name
* // will be transferred to localStorage and deleted
* persistence: 'cookie'
*
* // name for super properties persistent store
* persistence_name: ''
*
* // names of properties/superproperties which should never
* // be sent with track() calls
* property_blacklist: []
*
* // if this is true, mixpanel cookies will be marked as
* // secure, meaning they will only be transmitted over https
* secure_cookie: false
*
* // disables enriching user profiles with first touch marketing data
* skip_first_touch_marketing: false
*
* // the amount of time track_links will
* // wait for Mixpanel's servers to respond
* track_links_timeout: 300
*
* // adds any UTM parameters and click IDs present on the page to any events fired
* track_marketing: true
*
* // enables automatic page view tracking using default page view events through
* // the track_pageview() method
* track_pageview: false
*
* // if you set upgrade to be true, the library will check for
* // a cookie from our old js library and import super
* // properties from it, then the old cookie is deleted
* // The upgrade config option only works in the initialization,
* // so make sure you set it when you create the library.
* upgrade: false
*
* // extra HTTP request headers to set for each API request, in
* // the format {'Header-Name': value}
* xhr_headers: {}
*
* // whether to ignore or respect the web browser's Do Not Track setting
* ignore_dnt: false
* }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants