Documentation
    Preparing search index...

    Interface InitConfiguration

    interface InitConfiguration {
        allowedTrackingOrigins?: MatchOption[];
        allowFallbackToLocalStorage?: boolean;
        allowUntrustedEvents?: boolean;
        beforeSend?: GenericBeforeSendCallback;
        clientToken: string;
        datacenter?: string;
        env?: null | string;
        proxy?: string | ProxyFn;
        replica?: ReplicaUserConfiguration;
        service?: null | string;
        sessionPersistence?: "local-storage" | "cookie";
        sessionSampleRate?: number;
        silentMultipleInit?: boolean;
        site?: Site;
        storeContextsAcrossPages?: boolean;
        telemetrySampleRate?: number;
        trackAnonymousUser?: boolean;
        trackingConsent?: TrackingConsent;
        trackSessionAcrossSubdomains?: boolean;
        usePartitionedCrossSiteSessionCookie?: boolean;
        useSecureSessionCookie?: boolean;
        version?: null | string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowedTrackingOrigins?: MatchOption[]

    List of origins where the SDK is allowed to run when used in a browser extension context. Matches urls against the extensions origin. If not provided and the SDK is running in a browser extension, a warning will be displayed.

    allowFallbackToLocalStorage?: boolean

    Allows the use of localStorage when cookies cannot be set. This enables the RUM Browser SDK to run in environments that do not provide cookie support.

    Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values See Monitor Electron Applications Using the Browser SDK for further information.

    use sessionPersistence: local-storage where you want to use localStorage instead

    allowUntrustedEvents?: boolean

    Allow listening to DOM events dispatched programmatically (untrusted events). Enabling this option can be useful if you heavily rely on programmatic events, such as in an automated UI test environment.

    false
    
    beforeSend?: GenericBeforeSendCallback

    A callback function that can be used to modify events before they are sent to Datadog.

    clientToken: string

    The client token for Datadog. Required for authenticating your application with Datadog.

    datacenter?: string

    [Internal option] Set the datacenter from where the data is dual shipped

    env?: null | string

    The application’s environment, for example: prod, pre-prod, and staging. Follows the tag syntax requirements.

    proxy?: string | ProxyFn

    Optional proxy URL, for example: https://www.proxy.com/path. See Proxy Your Browser RUM Data for further information.

    replica?: ReplicaUserConfiguration

    [Internal option] Configure the dual shipping to another datacenter

    service?: null | string

    The service name for your application. Follows the tag syntax requirements.

    sessionPersistence?: "local-storage" | "cookie"

    Which storage strategy to use for persisting sessions. Can be either 'cookie' or 'local-storage'.

    Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values

    "cookie"
    
    sessionSampleRate?: number

    The percentage of sessions tracked. A value between 0 and 100.

    100
    
    silentMultipleInit?: boolean

    Initialization fails silently if the RUM Browser SDK is already initialized on the page.

    false
    
    site?: Site

    The Datadog site parameter of your organization.

    datadoghq.com
    
    storeContextsAcrossPages?: boolean

    Store global context and user context in localStorage to preserve them along the user navigation. See Contexts life cycle for further information.

    false
    
    telemetrySampleRate?: number

    The percentage of telemetry events sent. A value between 0 and 100.

    20
    
    trackAnonymousUser?: boolean

    Track anonymous user for the same site and extend cookie expiration date

    true
    
    trackingConsent?: TrackingConsent

    Set the initial user tracking consent state. See User tracking consent for further information.

    granted
    
    trackSessionAcrossSubdomains?: boolean

    Preserve the session across subdomains for the same site.

    Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values

    false
    
    usePartitionedCrossSiteSessionCookie?: boolean

    Use a partitioned secure cross-site session cookie. This allows the RUM Browser SDK to run when the site is loaded from another one (iframe). Implies useSecureSessionCookie.

    Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values

    false
    
    useSecureSessionCookie?: boolean

    Use a secure session cookie. This disables RUM events sent on insecure (non-HTTPS) connections.

    Important: If you are using the RUM and Logs Browser SDKs, this option must be configured with identical values

    false
    
    version?: null | string

    The application’s version, for example: 1.2.3, 6c44da20, and 2020.02.13. Follows the tag syntax requirements.