TealiumConfig Structure Reference
public struct TealiumConfig
The object used to configure a Tealium instance with constant values and dependencies.
-
The Tealium account
Declaration
Swift
public let account: String -
The Tealium profile for the given account
Declaration
Swift
public let profile: String -
The environment, typically prod/qa/dev
Declaration
Swift
public let environment: String -
The datasource for the data coming from this SDK
Declaration
Swift
public let dataSource: String? -
A key used to uniquely identify
Tealiuminstances.Declaration
Swift
public var key: String { get } -
The file name from which to read the Local JSON settings. These settings will be deep merged with Remote and Programmatic settings, which will take priority over Local settings.
Declaration
Swift
public internal(set) var settingsFile: String? { get } -
The URL from which to download Remote settings. These settings will be deep merged with Local and Programmatic settings. Programmatic settings will take priority over Remote settings, Remote settings will take priority over Local settings.
Declaration
Swift
public internal(set) var settingsUrl: String? { get } -
A list of unique
ModuleFactorys, each one for creating a specificModule.Declaration
Swift
public internal(set) var modules: [any ModuleFactory] { get } -
A list of unique
BarrierFactorys, each one for creating a specificConfigurableBarrierDeclaration
Swift
public internal(set) var barriers: [any BarrierFactory] { get } -
A type of logger that can handle logs of different level
Declaration
Swift
public var loggerType: TealiumLoggerType -
The specific bundle in which to look for objects like the Local settings.
Declaration
Swift
public var bundle: Bundle -
A visitor ID to be used instead of our anonymous visitor ID.
Declaration
Swift
public var existingVisitorId: String? -
An adapter that can convert CMP specific data to a
ConsentDecisionthat theTealiumconsent integration system can handle.Declaration
Swift
public var cmpAdapter: CMPAdapter? -
Creates a new Tealium configuration.
Declaration
Swift
public init(account: String, profile: String, environment: String, dataSource: String? = nil, modules: [any ModuleFactory] = [], settingsFile: String? = nil, settingsUrl: String? = nil, forcingSettings block: ((_ builder: CoreSettingsBuilder) -> CoreSettingsBuilder)? = nil)Parameter Description accountThe Tealium account identifier.
profileThe Tealium profile identifier.
environmentThe environment (dev, qa, prod).
dataSourceOptional data source identifier.
modulesArray of module factories to initialize.
settingsFileOptional local settings file name.
settingsUrlOptional remote settings URL.
blockOptional block for forcing core settings.
-
Adds a
ModuleFactoryto the list of modules that need to be instantiated by the SDK.You can add a
ModuleFactoryfor a specificModuleonly once. Adding two of them will result in all but the first to be discarded. Some specificModuleFactory, likeModules.collect()can potentially instantiate more than oneCollectmodule, if they are provided with multiple settings and differentModuleIDs, but the factory still only needs to be added once.Declaration
Swift
public mutating func addModule<SpecificFactory>(_ module: SpecificFactory) where SpecificFactory : ModuleFactoryParameter Description moduleThe unique
ModuleFactoryused to create a specific type ofModule. -
Sets a load rule to be used by any of the modules by the rule’s key.
Declaration
Parameter Description ruleThe
Rule<Condition>that defines when that rule should match a payload.loadRuleIdThe id used to look up this specific rule when defining it in the
ModuleSettings -
Sets a transformation to be used by a specific transformer.
The transformation ID and transformer ID will be combined and need to be unique or the newer transformation will replace older ones.
Declaration
Swift
public mutating func setTransformation(_ transformation: TransformationSettings)Parameter Description transformationThe
TransformationSettingsthat defines whichTransformershould handle this transformation and how. -
Adds a
BarrierFactorythat will create aConfigurableBarrierto control the flow of dispatches to theDispatchers.Declaration
Swift
public mutating func addBarrier(_ barrier: any BarrierFactory)Parameter Description barrierThe
BarrierFactorythat can create a specificConfigurableBarrier. -
Enable consent integration with a
CMPAdapter.If you enable consent integration events will only be tracked after the
CMPAdapterreturns aConsentDecision, And only after aConsentConfigurationis found for that adapter.Make sure to properly configure consent either locally, remotely or programmatically for the provided
CMPAdapterto ensure proper tracking.Declaration
Swift
mutating public func enableConsentIntegration(with cmpAdapter: CMPAdapter, forcingConfiguration block: ((_ enforcedConfiguration: ConsentConfigurationBuilder) -> ConsentConfigurationBuilder)? = nil)Parameter Description cmpAdapterThe adapter that will report the
ConsentDecisionto the SDKblockAn optional block called with a configuration builder, used to force some of the
ConsentConfigurationproperties. Properties set with this block will have precedence to local and remote settings.