C# Class Tealium.TealiumTagger

The core component for integration with Tealium. Must be initialized via the TealiumTagger.Initialize static method prior to calling any member methods. The majority of use cases will leverage the TealiumTagger.TrackScreenViewed, TrackItemClicked, and TrackCustomEvent methods. Custom attributes and XAML attached properties also exist for convenience.
Inheritance: Tealium.IAnalyticsTagger
Show file Open project: Tealium/win-library Class Usage Examples

Public Methods

Method Description
Initialize ( Frame rootFrame, TealiumSettings settings ) : void

Initializes the singleton instance of the TealiumTagger with the specified settings and specified Frame instance. This version is useful when the root visual of the application is not a Frame.

Initialize ( TealiumSettings settings ) : void

Initializes the singleton instance of the TealiumTagger with the specified settings. Assumes that the root visual of the application is an instance of Frame.

SetGlobalVariable ( string name, string value ) : void

Adds an individual name/value pair to the collection of global/base variables. The value will be persisted for the lifetime of the application, or until manually cleared.

SetGlobalVariables ( IDictionary variables ) : void

Adds the supplied collection of name/value pairs to the collection of global/base variables. These values will be persisted for the lifetime of the application, or until manually cleared.

SetVariable ( string name, string value ) : void

Adds an individual name/value pair to the persisted collection of variables. The value will be persisted between calls until ClearVariables is called or the application navigates to a new page.

SetVariables ( IDictionary variables ) : void

Adds the supplied collection of name/value pairs to the collection of variables. These values will be persisted between calls until ClearVariables is called or the application navigates to a new page.

TrackCustomEvent ( string eventName, IDictionary variables = null ) : void

Reports a custom event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted.

TrackItemClicked ( string itemName, IDictionary variables = null ) : void

Reports a click/link event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted.

TrackScreenViewed ( string viewName, IDictionary variables = null ) : void

Reports a page view event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted, with the exception of the screen/view/page name.

Private Methods

Method Description
BustCacheParam ( ) : object
CopyVarsFromBase ( ) : string>.Dictionary
Current_VisibilityChanged ( object sender, Windows e ) : void
ErrorRootIsNotFrame ( ) : void
GetEnvironmentString ( TealiumEnvironment tealiumEnvironment ) : object
GetJson ( string>.Dictionary variablesToSend ) : string
GetWebViewUrl ( ) : string
InitializeTrackingFrame ( ) : void
LibVersion ( ) : object
LoadAutomaticNavigationProperties ( object page, object parameter ) : void
QueryParams ( ) : object
RegisterWithRootFrame ( ) : void
ReportPageNavigation ( object page, NavigationMode navigationMode = NavigationMode.New ) : void
SendEvent ( string eventName, string jsonParams ) : void
SettingsValid ( ) : bool
SubscribeEvents ( ) : void
TealiumTagger ( Frame rootFrame, TealiumSettings settings ) : System.Threading.Tasks
TealiumTagger ( TealiumSettings settings ) : System.Threading.Tasks
Timestamp ( ) : object
UnsubscribeEvents ( ) : void
rootFrame_Navigated ( object sender, NavigationEventArgs e ) : void
rootFrame_Navigating ( object sender, NavigatingCancelEventArgs e ) : void
rootFrame_Unloaded ( object sender, RoutedEventArgs e ) : void

Method Details

Initialize() public static method

Initializes the singleton instance of the TealiumTagger with the specified settings and specified Frame instance. This version is useful when the root visual of the application is not a Frame.
public static Initialize ( Frame rootFrame, TealiumSettings settings ) : void
rootFrame Frame
settings TealiumSettings
return void

Initialize() public static method

Initializes the singleton instance of the TealiumTagger with the specified settings. Assumes that the root visual of the application is an instance of Frame.
public static Initialize ( TealiumSettings settings ) : void
settings TealiumSettings
return void

SetGlobalVariable() public method

Adds an individual name/value pair to the collection of global/base variables. The value will be persisted for the lifetime of the application, or until manually cleared.
public SetGlobalVariable ( string name, string value ) : void
name string
value string
return void

SetGlobalVariables() public method

Adds the supplied collection of name/value pairs to the collection of global/base variables. These values will be persisted for the lifetime of the application, or until manually cleared.
public SetGlobalVariables ( IDictionary variables ) : void
variables IDictionary
return void

SetVariable() public method

Adds an individual name/value pair to the persisted collection of variables. The value will be persisted between calls until ClearVariables is called or the application navigates to a new page.
public SetVariable ( string name, string value ) : void
name string
value string
return void

SetVariables() public method

Adds the supplied collection of name/value pairs to the collection of variables. These values will be persisted between calls until ClearVariables is called or the application navigates to a new page.
public SetVariables ( IDictionary variables ) : void
variables IDictionary
return void

TrackCustomEvent() public method

Reports a custom event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted.
public TrackCustomEvent ( string eventName, IDictionary variables = null ) : void
eventName string
variables IDictionary
return void

TrackItemClicked() public method

Reports a click/link event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted.
public TrackItemClicked ( string itemName, IDictionary variables = null ) : void
itemName string
variables IDictionary
return void

TrackScreenViewed() public method

Reports a page view event with the specified details. Variables that have the same name as persisted variables set by SetVariables will take precedence. All variables passed to this call will not be persisted, with the exception of the screen/view/page name.
public TrackScreenViewed ( string viewName, IDictionary variables = null ) : void
viewName string
variables IDictionary
return void