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-eventCreate 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 PluginsFactorybaseUrl: 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 |
Since version 2.2.0, the Web SDK uses localStorage by default. Web storage keys are prefixed with npotag_, for example npotag__dvp and npotag__dvs.
From Web SDK 3.3.2, setting cookie_domain moves party ID, session ID, brand ID, and session last-use timestamp to cookies shared on that domain, when cookies are available. Configure the same value on every participating host, including the main site. Other SDK values continue to use the default storage. If localStorage is unavailable, default storage can also fall back to cookies for the current host, or to memory if cookies are unavailable.
Existing cookie values take precedence over localStorage values during migration. See Cross-subdomain session sharing for configuration, ID migration, conflicts between existing IDs, and the blocked-cookie limitation.
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. On web, initialization reuses a valid stored session ID. A new ID is generated when no valid session exists, after 30 minutes of inactivity, when brand_id changes, or when the stored last-use time is before midnight in Europe/Amsterdam (CET/CEST). With cookie_domain, the same valid session can be shared across hosts using the same brand_id.
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.