CML
    Preparing search index...

    Type Alias CmcdEncodeOptions

    Options for encoding CMCD values.

    type CmcdEncodeOptions = {
        baseUrl?: string;
        customHeaderMap?: Partial<CmcdHeaderMap>;
        events?: string[];
        filter?: (key: CmcdKey) => boolean;
        formatters?: Partial<CmcdFormatterMap>;
        reportingMode?: CmcdReportingMode;
        version?: CmcdVersion;
    }
    Index

    Properties

    baseUrl?: string

    Base URL (typically the manifest or current request URL) used to convert absolute nor values into paths relative to this base, per the CMCD specification. Values that are already relative paths are not modified by this option, though CMCD v1 still URL-encodes them on emission. When omitted, nor values are emitted as-is (subject to the v1 URL-encoding rule).

    customHeaderMap?: Partial<CmcdHeaderMap>

    A map of CMCD header fields to custom CMCD keys.

    events?: string[]

    Array of event names to filter.

    filter?: (key: CmcdKey) => boolean

    A filter function for CMCD keys.

    Type Declaration

      • (key: CmcdKey): boolean
      • Parameters

        • key: CmcdKey

          The CMCD key to filter.

        Returns boolean

        true if the key should be included, false otherwise.

    A map of CMCD keys to custom formatters.

    reportingMode?: CmcdReportingMode

    The reporting mode to use.

    CmcdReportingMode.REQUEST

    version?: CmcdVersion

    The version of the CMCD specification to use.

    1