airbridge-web-sdk
    Preparing search index...

    Type Alias InitializeOptions

    type InitializeOptions = {
        app: string;
        webToken: string;
        autoStartTrackingEnabled?: boolean;
        collectMolocoCookieID?: boolean;
        cookieWindow?: number;
        cookieWindowInMinutes?: number;
        defaultChannel?: string;
        defaultParams?: AttributionParameters;
        forceFirstPartyCookieID?: boolean;
        overwriteInstance?: boolean;
        protectedAttributionWindowInMinutes?: number;
        sessionTimeout?: number;
        shareCookieSubdomain?: boolean;
        urlQueryMapping?: URLQueryMapping;
        useProtectedAttributionWindow?: boolean;
        user?: User;
        userHash?: boolean;
        useStoragePerApp?: boolean;
        utmParameterValueReplaceMap?: UTMParameterValueReplaceMap;
        utmParsing?: boolean;
    }
    Index

    Properties

    app: string

    The name of your application.

    webToken: string

    The web token for your application.

    autoStartTrackingEnabled?: boolean

    Whether to automatically start event tracking when the SDK is initialized.
    If set to true, the SDK will automatically start event tracking when the SDK is initialized.
    If set to false, you need to call the airbridge.startTracking method manually to start event tracking.

    true
    
    collectMolocoCookieID?: boolean

    Whether to collect the Moloco cookie ID.
    If set to true, the SDK will collect the Moloco cookie ID.
    If set to false, the SDK will not collect the Moloco cookie ID.

    false
    
    cookieWindow?: number

    The window time in days for the cookie expiration.

    3
    
    cookieWindowInMinutes?: number

    The window time in minutes for the cookie expiration.
    If set, this will override the InitializeOptions.cookieWindow option.

    defaultChannel?: string

    The default channel name for the attribution.

    defaultParams?: AttributionParameters

    The default attribution parameters.

    forceFirstPartyCookieID?: boolean

    Whether to use the first-party cookie ID instead of the third-party cookie ID for the attribution.
    If set to true, the SDK will use the first-party cookie ID for the attribution.
    If set to false, the SDK will use the third-party cookie ID for the attribution.

    false
    
    overwriteInstance?: boolean

    Whether to overwrite the existing instance of the SDK.
    If set to true, the SDK will re-initialize the global instance by replacing the existing instance with the new instance.

    false
    
    protectedAttributionWindowInMinutes?: number

    The window time in minutes for the protected attribution window.
    This option will be ignored if InitializeOptions.useProtectedAttributionWindow is false.

    30
    
    sessionTimeout?: number

    The session timeout in milliseconds.

    1800000 (30 minutes)
    
    shareCookieSubdomain?: boolean

    Whether to save the cookie in the subdomain.
    If set to true, the SDK will save the cookie in the subdomain.
    If set to false, the SDK will save the cookie in the root domain if localStorage is not available.

    true
    
    urlQueryMapping?: URLQueryMapping

    Sets the mapping for the URL query parameters.
    This option will be ignored if InitializeOptions.utmParsing is false.

    airbridge.init({
    urlQueryMapping: {
    channel: 'utm_source',
    campaign: 'utm_campaign',
    },
    })
    useProtectedAttributionWindow?: boolean

    Whether to use the protected attribution window.
    If set to true, the SDK will parse the UTM parameters from the URL.

    true
    
    user?: User

    Sets the user object for the attribution.

    userHash?: boolean

    Whether to hash the user email and phone number.
    If set to true, the SDK will hash the user email and phone number when sending the event.

    true
    
    useStoragePerApp?: boolean

    No longer has any effect. This option is always treated as true.
    Whether to split the storage per application name.
    If set to true, the SDK will split the storage per application name.

    true
    
    utmParameterValueReplaceMap?: UTMParameterValueReplaceMap

    Sets the mapping for the UTM parameters.

    airbridge.init({
    utmParameterValueReplaceMap: {
    utm_source: {
    'test.1': 'test',
    'test.2': 'test',
    },
    },
    })
    utmParsing?: boolean

    Whether to parse the UTM parameters from the URL.
    If set to true, the SDK will parse the UTM parameters from the URL.

    false