Freshpaint Web SDK Options
Init Options
Freshpaint's SDK accepts a number of options in its init
method. We'll go over those options in this document. Here's a typical invocation of init
, which you can find in our Autotrack snippet:
Below is a table of the options we support with the init
method:
Option | Type | Default | Description |
---|---|---|---|
| string | (your account's api host) | We use |
| string | (your account's app host) | This is an internal option we use to support client-side events and our Visual Tagger. You shouldn't change this value without specific guidance from Freshpaint. |
| boolean |
| Set this option to true if you don't want autotrack to capture target text properties like |
| object |
| Pass a list of integrations that you want to send your events to. This will override your events normal destinations. See the documentation on event options for details on how this should look. |
| string |
| How Freshpaint's SDK will save user session information. The possible values are |
| number |
| The SDK will register an |
| number |
| The timeout for Freshpaint to start a new session, in seconds. If more than |
Event Options
Each event allows you to pass in a list of integrations to which you want to send your event. This is a great way to conditionally enable or disable an integration while you're experimenting. Here's an example of how it works:
There's a couple of interesting properties to highlight here. The first is All: false
. You can use this to override your event's normal list of destinations, and send to none of them, except for Mixpanel
and Iterable
, which are both true.
The inverse of this behavior is also possible. Consider the following:
Here, you'll send to every destination except Mixpanel.
If you have multiple configured instances of a given destination type, you can choose a specific one with a suffix, such as: Facebook Conversions API::0123456789012345. The configuration page for the instance shows the full value to use. When no suffix is specified, all configured instances of the destination type are selected for inclusion / exclusion.
Last updated