The Govolte plugin sends events to the Govolte collector.
Create and configure the plugin as follows:
The newGovoltePlugin
method supports the following optional configuration properties:
maxRetryCount: number
: Max number of retries before ditching an event. For example, if you set it to 3 then it will do 4 trials. Value should be between 0 and 10. Defaults to 3.delayBetweenRetriesInMs: number
: Number of ms between each retry call. It will be multiplied by the retry count so calls retry with exponential back-off. Value should be between 0 and 30_000. Defaults to 5_000.delayBetweenStreamWaypointsInMs number
: Number of milliseconds between streamWaypoint
events. Other stream-related events will also reset this interval. Value should be between 0 and 30_000. Defaults to 30_000.baseUrl: string
: Destination url to which events will be sent. Defaults to https://topspin.npo.nl
.// Accept all defaults
const govoltePlugin = newGovoltePlugin();
// Modify configuration
const govoltePlugin = newGovoltePlugin({
maxRetryCount: 5,
delayBetweenRetriesInMs: 10_000,
delayBetweenStreamWaypointsInMs: 5_000,
baseUrl: 'https://my.custom.domain.com',
});
The newGovoltePlugin
method supports the following optional configuration properties:
maxRetryCount: number
: Max number of retries before ditching an event. For example, if you set it to 3 then it will do 4 trials. Value should be between 0 and 10. Defaults to 3.delayBetweenRetriesInMs: number
: Number of ms between each retry call. It will be multiplied by the retry count so calls retry with exponential back-off. Value should be between 0 and 30_000. Defaults to 5_000.delayBetweenStreamWaypointsInMs number
: Number of milliseconds between streamWaypoint
events. Other stream-related events will also reset this interval. Value should be between 0 and 30_000. Defaults to 30_000.baseUrl: string
: Destination url to which events will be sent. Defaults to https://topspin.npo.nl
.e.g.
// Accept all defaults
const govoltePlugin = newGovoltePlugin();
// Modify configuration
const govoltePlugin = newGovoltePlugin({
maxRetryCount: 5,
delayBetweenRetriesInMs: 10_000,
delayBetweenStreamWaypointsInMs: 5_000,
baseUrl: 'https://my.custom.domain.com',
});
The GovoltePlugin
plugin should be included within the plugins
when creating the shared NPOTag
instance.
endpoint: URL
: Destination url to which events will be sent. If not set, defaults to https://topspin.npo.nl/mob-event
Create the GovoltePlugin
accepting default URL
let govoltePlugin = GovoltePlugin()
Or specifying your custom URL
let url = URL(string: "https://my.custom.domain.com")!
let govoltePlugin = GovoltePlugin(endpoint: url)
Finally, add the created plugin when setting your shared NPOTag
instance
NPOTag.configure(
withSharedContext: sharedContext,
plugins: [
govoltePlugin
]
)
GovoltePlugin
should be created by PluginsFactory
(see example below)
pluginContext
: Object provided by PluginsFactory
baseUrl
: Destination url to which events will be sentNpoTag.builder()
//...
.withPluginsFactory { pluginContext ->
setOf(
GovoltePlugin(
pluginContext = pluginContext,
baseUrl = "https://topspin.npo.nl/",
)
)
}
Key | Description of value |
---|---|
_dvp | The ID generated for this browser, used to understand usage patterns over multiple visits |
_dvs | The Session ID, used to understand usage patterns within a browser session |
_cs_fpid | An ID set in the browser, always set but only used when a visitor participates in NMO DAM research panels |
Starting from Version 2.2.0, the Web SDK values are no longer stored in cookies and use LocalStorage instead. These keys are prefixed with npotag_
The following fields are inferred by the sdk and only used by the GovoltePlugin.
A unique identifier used to track anonymous user activity between sessions. This is stored for max 2 years after the last visit. This value is logged if debug
is true.
A unique identifier used to track a single session. A new identifier is generated on initialization or after 30 minutes of inactivity.
Indicates that the party_id was newly generated in this session.
Indicates that an event is the first one sent with the current session id. This should only be true for one event per session.
A unique identifier for the page view related to the page context.
A unique identifier of the event, formed by appending an auto-incrementing integer to the pageViewId
.
The height of the user’s screen.
The width of the user’s screen.
The pixel ratio of the user’s device.
[Web only] The height of the browser window.
[Web only] The width of the browser window.
The current orientation of the user’s device.
NOTE: On web, this has the following possible values: portrait-primary
, portrait-secondary
, landscape-primary
, landscape-secondary
. The value is taken from the screen orientation api if supported, otherwise it tries the window.orientation api (i.e. on mobile safari). If neither of these are supported, the value is naively inferred by comparing screenWidth
to screenHeight
.