track
call can be used to manually send data to your destinations. See the docs on manually tracking events in Freshpaint for more information.String
Object
Object
Function
identify
call can used to attach user properties the current user. Destinations will then use that data to create a single profile for that user, even if data for that user comes from multiple places. See the identify docs for more information.String
Object
Object
Function
group
call can be used to attach group properties to the current user. Destinations will then allow you to analyze different groups of users.String
Object
Object
Function
alias
call can be used to specify one user id as an alias for another user id. This is needed to implement the identify for some destinations, specifically Mixpanel and Kissmetrics.String
String
Object
Function
page
will trigger a virutal pageview in your downstream destinations. This is only supported by some destinations such as Google Analytics and HubSpot. By default, Freshpaint will collect pageviews out of the box, even for a single page application. If you have some notion of a page view that does not match the automatic pageview tracking, you should set up a custom event by using freshpaint.track() instead.String
string
Object
Object
Function
ready
call will call the provided callback after the Freshpaint SDK and the SDK for all destinations has finished loading.Function
reset
call clears any local Freshpaint data attached to this user. This does not clear any local data for any of your destinations.addEventProperties
call can be used to set data layer properties. Once a property is set through addEventProperties
all events going forward will contain that property. The callpricing plan
with the value enterprise
until either the value is overwritten or you delete the property with removeEventProperty
. addEventProperties
should be used to set any properties that can change.Object
addPageviewProperties
call creates data layer properties that persist until the user leaves the page. The properties created with addPageviewProperties
are automatically removed once the user leaves the current page. The call:product name
with the value pair of shoes
as part of all events that occur on the current page. Once the user leaves the current page, the property will no longer be sent. The addPageviewProperties
call should be used to set any properties that are specific to the page the user is currently on.addPageviewProperties
you should call it as part of the Freshpaint snippet. Specifically you should call addPageviewProperties
immediately after the freshpaint.init()
call and before the call to freshpaint.page()
. This ensures any pageview properties you set are attached to the pageview event created by Freshpaint.Object
addInitialEventProperties
call works the same way as addEventProperties
except if a property is already set, addInitialEventProperties
will not override it. This is useful for when you care about the first value of some property. As an example, the callinitial landing page
to /article
. Even after calling addInitialEventProperties
with a different of initial landing page
the value of initial landing page
will still be /article
. addInitialEventProperties
should be used to set properties that you never want to change.Object
removeEventProperty
call can be used to remove data layer properties. Once used, freshpaint will no longer send the given property. As an example, the call:search term
property and Freshpaint will stop sending it going forward.String
integrations
object in the options
argument for each of the tracking methods (track, identify, etc.) to specify which destinations to send a precision-tracked event.All: false
tells Freshpaint to not send the message to any destinations unless the destination is explicitly set to true
.identify
message to all destinations except Mixpanel and Braze:freshpaint.track()
, you can specify which destinations an event should be sent to without code. You can do this by finding the event in the Freshpaint UI and toggling the destination.