Module

A Module is the generic protocol that any plugin added to tealium must conform.

Each module, then, can conform to each of the following protocols as well to add extra functionality:

  • A module used by the Tealium SDK to provide some plugin functionality.

    See more

    Declaration

    Swift

    public protocol Module : AnyObject
  • A restricted Module that can be created with some default parameters and only allows a single instance.

    See more

    Declaration

    Swift

    public protocol BasicModule : Module
  • A basic factory that can be reused to create modules that have no extra dependencies and can only be initialized once.

    BasicModuleFactory is a generic implementation of ModuleFactory that simplifies the creation of modules conforming to the BasicModule protocol.

    For detailed guidance on creating custom modules, see Creating Custom Modules.

    ## Important Notes

    • The generic Module type must conform to BasicModule
    • Modules created by this factory cannot be instantiated multiple times (allowsMultipleInstances is always false)
    • Use ModuleSettingsBuilder subclasses for type-safe configuration
    • Module type constants should be defined in Modules.Types for consistency
    See more

    Declaration

    Swift

    public class BasicModuleFactory<Module> : ModuleFactory where Module : BasicModule
  • An error caused when trying to use a Module.

    See more

    Declaration

    Swift

    public enum ModuleError<SomeError> : ErrorEnum, ErrorWrapping where SomeError : Error
  • A factory that is used to create a specific Module with some standard parameters.

    See more

    Declaration

    Swift

    public protocol ModuleFactory
  • A ModuleProxy is to be used for proxying access to modules that are or were available to access from the main Tealium implementation.

    Any external Module implementation that provides functionality expected to be used by a developer should wrap their access to Tealium through a ModuleProxy.

    See more

    Declaration

    Swift

    public class ModuleProxy<SpecificModule, Failure> where SpecificModule : Module, Failure : Error
  • A base class that adds the enabled setter for SettingsBuilders that are Optional and therefore can be disabled.

    See more

    Declaration

    Swift

    open class ModuleSettingsBuilder
  • A class responsible for registering and returning the DataStore instances required by individual modules.

    See more

    Declaration

    Swift

    public class ModuleStoreProvider
  • Manages the lifecycle and configuration of modules within the Tealium SDK.

    See more

    Declaration

    Swift

    public class ModulesManager
  • A settings builder for a module that supports multiple instances.

    See more

    Declaration

    Swift

    public protocol MultipleInstancesModuleSettingsBuilder
  • A Module that implements the functionality of collecting data to enrich the data layer of each track request.

    See more

    Declaration

    Swift

    public protocol Collector : Module
  • CollectorSettingsBuilder From TealiumPrismCore

    A builder for Collector Settings which adds the possibility to set Rules.

    Declaration

    Swift

    open class CollectorSettingsBuilder : ModuleSettingsBuilder, RuleModuleSettingsBuilder
  • A Module that implements the functionality of dispatching some track requests towards some entity that can handle the events.

    See more

    Declaration

    Swift

    public protocol Dispatcher : Module
  • A builder for Dispatcher Settings which adds the possibility to set Rules and JSONOperation<MappingParameters>.

    See more

    Declaration

    Swift

    open class DispatcherSettingsBuilder<M> : ModuleSettingsBuilder, RuleModuleSettingsBuilder where M : Mappings
  • Provides context and dependencies for modules within the Tealium SDK.

    See more

    Declaration

    Swift

    public class TealiumContext
  • An object that will apply different transformations, selected by transformationId, to a dispatch.

    See more

    Declaration

    Swift

    public protocol Transformer : Module
  • The TransformerRegistrar is responsible for registering and unregistering additional TransformationSettingss outside of those provided by the main SDK settings.

    See more

    Declaration

    Swift

    public protocol TransformerRegistrar
  • The Mappings builder is used to build up key/destination mappings used when optionally translating the full Dispatch payload to just the relevant data for any given Dispatcher.

    Use the mapFrom method to supply the required source “key” and “destination” key, as well as any optional “path” entries required to access keys in nested object.

    Using the following payload DataObject as an example (shown as JSON)

     {
          "source" : "value",
          "path": {
              "to" : [{
                  "source": "nested value",
              }]
          }
     }
    

    Simple usage for keys in the top level DataObject would look like so:

     mappings.mapFrom("source", to: "destination")
    

    More complex versions requiring accessing keys that exist in nested objects and arrays would look like so:

     mappings.mapFrom(JSONPath["path"]["to"][0]["source"],
                      to: JSONPath["path"]["to"]["destination"])
    

    Use the keep utility method to create a mapping where the source key is the same as the destination.

    Simple usage for keys in the top level DataObject would look like so:

     mappings.keep("source")
    

    More complex versions requiring accessing keys that exist in nested objects would look like so:

     mappings.keep(JSONPath["path"]["to"][0]["source"])
    

    The mapFrom and keep methods return a VariableOptions that allows for setting optional properties relevant to a mapping like a ifValueEquals(:), to only perform the mapping if the value is equal to some specific string.

    Use the mapConstant method to supply a constant “value” and “destination” key.

     mappings.mapConstant("value", to: "destination")
    

    More complex versions requiring accessing keys that exist in nested objects would look like so:

     mappings.mapConstant(value, to: JSONPath["path"]["to"]["destination"])
    

    The mapConstant method returns a ConstantOptions that allows for setting optional properties relevant to a mapping like a ifValueIn(:equals:), to only perform the mapping if a value at the given key is equal to the given target.

    See more

    Declaration

    Swift

    open class Mappings
  • MappingsBuilder From TealiumPrismCore

    Undocumented

    Declaration

    Swift

    public class MappingsBuilder