Install
Learn to install Tealium for Node.js
The tealium-collect
module for Node.js sends event data to the Tealium Customer Data Hub via the Tealium HTTP API. Use the module in server-side applications or in a browser.
Requirements
Install
To install the Tealium Collect module for Node.js with NPM, run the following command:
npm install tealium-collect
The install automatically includes the dependency module tealium
.
Initialize
-
Import the modules:
var Tealium = require('tealium'); var tealiumCollect = require('tealium-collect');
-
Initialize the
Tealium
instance with theTealium()
constructor method:var config = { "account" : "ACCOUNT", "profile" : "PROFILE", "datasource" : "DATASOURCE" }; var tealium = Tealium(config);
-
Call the
addModule()
method to add the Tealium Collect module :tealium.addModule(tealiumCollect);
This page was last updated: January 7, 2023