Add support for sending virtual pageviews on search events
Signed-off-by: Nikita Karpukhin <nikita.karpukhin@scout24.com>
This commit is contained in:
+26
@@ -53,6 +53,32 @@ export interface Config {
|
||||
*/
|
||||
identity?: 'disabled' | 'optional' | 'required';
|
||||
|
||||
/**
|
||||
* Controls whether to send virtual pageviews on `search` events.
|
||||
* Can be used to enable Site Search in GA.
|
||||
*/
|
||||
virtualSearchPageView?: {
|
||||
/**
|
||||
* - `disabled`: (Default) no virtual pageviews are sent
|
||||
* - `only`: Sends virtual pageview _instead_ of the `search` event
|
||||
* - `both`: Sends both the `search` event _and_ the virtual pageview
|
||||
* @visibility frontend
|
||||
*/
|
||||
mode?: 'disabled' | 'only' | 'both';
|
||||
/**
|
||||
* Specifies on which path the main Search page is mounted.
|
||||
* Defaults to `/search`.
|
||||
* @visibility frontend
|
||||
*/
|
||||
mountPath?: string;
|
||||
/**
|
||||
* Specifies which query param is used in the virtual pageview URL.
|
||||
* Defaults to `query`.
|
||||
* @visibility frontend
|
||||
*/
|
||||
queryParam?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether or not to log analytics debug statements to the console.
|
||||
* Defaults to false.
|
||||
|
||||
Reference in New Issue
Block a user