Tealium Windows API

Tealium Windows API

by on ‎11-30-2016 10:56 AM (244 Views)
FUNCTION NAME DESCRIPTION

initialize(account, profile, environment, logLevel)

Initializer for Tealium Environment.

resetSesionId()

Optionally reset the session id.

Track(title, dictionary, optionalCallBack)

Track event for immediate dispatch, with optional dictionary and optional callback function.

SetSessionId (sessionId)

Optionally set user defined session id.

SetVisitorId (visitorId)

Optionally set user defined visitor id.

 

INITIALIZE

initialize(string account, string profile, string environment, LogLevel logLevel)
Parameters Description Example Value
account Tealium account name tealiummobile
profile Tealium profile demo
environment Tealium environment (usually dev/qa/prod) dev
 logLevel Desired log level: 0-Trace, 1-DEBUG, 2-INFO, 3-WARN, 4-ERROR, 5-FATAL LogLevel.Error
// SAMPLE
Tealium.Initialize("tealiummobile", "demo", "dev", TealiumLogLevel.DEBUG);

 

RESET SESSION ID

ResetSessionId()
// SAMPLE
Tealium.ResetSessionId()

 

TRACK 

Track(string title, Dictionary <string, string> data, Action<Bool> callBackFunction)
Parameters Description
title

Name of event (becomes value for tealium_event)

data

Optional dictionary of additional data.

callBackFunction

Function type parameter that executes after returning from Track function.
// SAMPLE
// Basic track call
String name = "button pressed";
Tealium.Track(name);

// With optional data
Dictionary <string, string> data = new Dictionary<string, string> ();
data.Add("Key","Value");
name = "button pressed with optional data"
Tealium.Track(name, data);

// With optional callback
public void callBackFunction(){
// ... Custom code here
}
name = "button pressed with optional callBack"
Tealium.Track(name, callBackFunction)

// With optional data and callback
name = "button pressed with optional data and callback"
Tealium.Track(name, data, callBackFunction)

 

SET SESSION ID

SetSessionId(string sessionId)
Parameters Description
sessionId

String identifier for a session (app launch to terminate).

// SAMPLE
String sessionId = "123456789123"
Tealium.SetSessionId(sessionId);

  

 

SET VISITOR ID

SetVisitorId(string visitorId)
Parameters Description
visitorId

String identifier for a visitor id.

// SAMPLE
String visitorId = "312048730c8c11e6b4cbacbc329f41c7";
Tealium.SetVisitorId(visitorId);