Swift Module: Collect

Swift Module: Collect

by on ‎12-22-2017 06:36 AM - edited 2 weeks ago (469 Views)


Dispatches tracking calls to Tealium's Universal Data Hub (UDH).

In the Objective-C library (GitHub:tealium-ios), the Collect module dispatched events to the main profile by default, unless overridden. By contrast, the Swift Collect module sends data to the profile passed in the TealiumConfig object.

Supported Platforms

  • iOS
  • tvOS
  • watchOS
  • macOS



Framework will be auto-instantiated, so long as the pod is installed. Depends on TealiumCore pod. No additional import statements necessary besides import TealiumSwift.

pod 'tealium-swift/TealiumCollect


Framework will be auto-instantiated, so long as it is compiled into your app (included in "Embedded Binaries"). Depends on TealiumCore. No additional import statements necessary.


Recommended Usage

Usage of this module is strongly recommended if you are using Tealium's UDH. As an alternative, if you are using the Tag Management module, you may instead use the Collect tag via Tealium iQ. This may give greater control over the data and events dispatched to the UDH, as you may then use load rules and extensions to manipulate the data prior to dispatch. If you are using the Collect tag via Tealium iQ, please ensure the Collect module is disabled to avoid duplicate tracking requests.

Included Variables

The following variables will be transmitted with each tracking call while the module is enabled:

Variable Description Example Value
dispatch_service Static string to indicate which module the tracking call came from collect

Public API

There are no public API methods for the Collect module. Dispatch successes and failures may be monitored through the Delegate module.

Future Improvements

No planned changes.

Change Log


  • Minor code change to import TealiumCore module for Carthage builds.
  • Switch to POST request by default.
  • Added TealiumConfig method to switch back to legacy "vdata" dispatch method.
  • Improved URL override methods to give greater flexibility.


  • Added config method to override collect URL

Build 1

  • Send dispatches to vdata endpoint