Custom Event Tracking

Track any action that occurs in your App, such as button clicks, slides, video events.

Custom View Tracking

Track a view every time it appears, even if it has already been seen, such as a reload or back.

Auto-Tracking of New View Events

Automatically track every time a new view is presented or created.

HTTPS Call Option

Uses HTTPS to connect to Tealium for greater security.

Connectivity Caching

If the device loses internet connectivity, the device will cache all tracking activity until connectivity is reestablished.

Below are the instructions for installation and configuration of the Windows 8 Tagger Library. Attached to this article is a README file with the same instructions.


Before you attempt to integrate Tealium's mobile tagging solutions with your Windows 8 app, make certain you have the following:

  1. Your Tealium Account ID
  2. The Tealium Profile you will associate with your app

    Ideally you would have a separate Profile dedicated to your app.

  3. The publish environment you will use
    • TealiumTargetProd
    • TealiumTargetQA
    • TealiumTargetDev


  1. Download and compile the source code under the "Release" configuration in Visual Studio 2012.
  2. Include the DLL output (TealiumWinRT.DLL) in your project.

    You may also include the source code as a separate project in your solution.

Integrating Tealium's Code

Any *.cs file in which you implement Tealium's methods requires you to reference Tealium's libraries. To do this, add the following line of code to the import/reference area:

using Tealium;


In the App.xaml.cs file, add the following code within the onLaunched event:

TealiumTagger.Initialize(new TealiumSettings( "youraccount", "yourprofile", #if DEBUG TealiumEnvironment.TealiumTargetDev #else TealiumEnvironment.TealiumTargetProd #endif ));

The "youraccount" and "yourprofile" items are the account and profile you are using for your Windows 8 app.

View Tracking

By default page views are automatically tracked with every new forward navigation in the app. It will report the object/class name of your XAML page as the page name. To override this and provide your own page name, insert the TrackPageView attribute into your class definition and specify the page's name. In the example below, 'homepage' is the specified page name:

[TrackPageView("homepage")] public sealed partial class MyPage : Common.LayoutAwarePage { ... }

Setting the "TrackPageView" attribute on a page will report a page view metric, regardless of whether "AutoTrackPageViews" is enabled. Additional properties can be set using the "TrackPropertyAttribute" and "TrackNavigationParameterAttribute" decorators on the class definition.

Alternatively, you can manually record a page view metric. You may choose to do this if you need to include a custom collection of properties or if you wish to delay reporting (such as waiting for data to load). If you are manually recording 'view' metrics, then you will need to set AutoTrackPageViews=false, otherwise you will recieve duplicate reports.

Here's an example of including custom properties with a page view.

TealiumTagger.Instance.TrackScreenViewed("my-page-name", new Dictionary() { { "custom-prop-1", "value-1" }, { "custom-prop-2", someObject.SomeValue } });

To customize your view tracking or delay reporting, you must turn the automatic view tracking off. To do this:

  1. Navigate to the TealiumSettings.cs file.
  2. Locate the AutoTrackPageViews attribute and set it to false.



Custom Event Tracking

To add Custom Event Tracking to your app, you will have to add a few lines of code to your app's code. The Tealium Tagger Library is capable of tracking any action in the app using these two methods:



Custom Event Tracking
  1. Before you start tracking a custom event, you will need to register the Tealium namespace in XAML:


    x:Name="pageRoot" xmlns:tealium="using:Tealium" > 

  2. Locate the control of the event you wish to track and register the attached property:

    x:Name="itemGridView"> <tealium:TealiumEventBehavior.Event>

    <tealium:TealiumEvent EventName="ItemClick" VariableName="click"> <tealium:ParameterValue PropertyName="custom-prop-1" PropertyValue="value-1" /> <tealium:ParameterValue PropertyName="custom-prop-2" PropertyValue="value-2" />


    </tealium:TealiumEventBehavior.Event> ...


In the example above, we registered the ItemClick event on a GridView and will report it to Tealium as a click. There are two custom properties included with the call.

Tealium Settings

To minimize the need to customize the library, a variety of settings are provided to tailor it to different applications' needs.

  • Account / Profile / Environment - Account-specific settings for your application.
  • EnableOfflineMode (default:true) - This caches analytics calls if the app is offline and queues them for submission once connectivity is restored. Note: The order of requests is persisted, but there is no guarantee that timestamps will be correct once the requests are processed. The queue will only be processed when the application is running.
  • UseSSL (default:false) - This determines whether to referene the SSL/HTTPS version of the tracking control (true) or the standard HTTP version (false).
  • AutoTrackPageViews (default:true) - This determined whether to automatically log a 'view' metric with the Tealium Tagger whenever a new page navigation is performed. Disable this if you're manually tracking page views with TealiumTagger.Instance.TrackPageView().
  • ViewMetricEventName / ViewMetricIdParam / ClickMetricEventName / ClickMetricIdParam - This overrides the default names given to the view and click events.