- 1 Minute to read
- Print
- DarkLight
session
- 1 Minute to read
- Print
- DarkLight
Overview
Value | Description | Data type | Default value | Required | Where to analyze | Request Parameter |
---|---|---|---|---|---|---|
loginStatus | Pass the user login status here. If you send it multiple times in a session, only the last status will be saved. |
| - | Visitors > Session Parameters | cs800 | |
parameter | Use parameters to add additional information to a visit. Find details below. |
| - | Visitors > Session Parameters or metric | cs[ID] |
Further information
parameter
Before use, parameters must be set up under Mapp Q3 > Configuration > Custom Parameters > Session Parameter. The ID and data type (text/number) are defined for each parameter during setup.
If the value for the parameter is transmitted during a visit several times, only the first or last value is evaluated based on the configuration. Find more info here.
Example (parameter with ID "1"): {1:"group-A"}
Implementation Examples
If you do not have automatic page tracking enabled, invoke the track method after adding all relevant tracking information.
import { Component } from '@angular/core';
import { WebtrekkSmartPixelAngular } from '@webtrekk-smart-pixel/angular';
@Component({
template: `<div>[ ... ]</div>`
})
export class ExampleComponent {
constructor(private pixel: WebtrekkSmartPixelAngular) {
this.pixel.session({
loginStatus: "login",
parameter: {5: "male"}
});
}
}
Please add
WebtrekkSmartPixelModule
to your root NgModule and configure the options before using directives.
If you do not have automatic page tracking enabled, invoke the track method after adding all relevant tracking information.
import { Component } from '@angular/core';
@Component({
template: `<div [wt-session-data]="webtrekkData"></div>`
})
export class ExampleComponent {
webtrekkData = {
loginStatus: 'logged in',
parameter: {1: 'foo', 2: 'bar'}
}
}