Install
Learn to install Tealium for Python.
Requirements
- Tealium Customer Data Hub account
- Python 2.7+
Sample Script
To help familiarize yourself with the Tealium library, the tracking methods, and best practice implementation, see the Python sample script.
Install
To install the Tealium library for Python:
-
Determine which version of Python you are using with the following command:
python -V
-
Run the following pip command:
Python 2
pip install tealium
Python 3
pip3 install tealium
Initialize
Import the module and initialize the Tealium
instance with the Tealium()
constructor, as shown in the following example:
from tealium import Tealium
teal = Tealium("ACCOUNT", "PROFILE", "ENVIRONMENT", "DATASOURCE")
As of version 2.0.0, visitorId, sessionId, local storage and vdata
dispatcher has been removed. All Collect module requests are now sent as POST requests to the /event
endpoint. The Tealium initializer no longer has a PATH parameter.
This page was last updated: January 7, 2023