- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Track any action that occurs in your App, such as button clicks, slides, video events.
Track a view every time it appears, even if it has already been seen, such as a reload or back.
Automatically track every time a new view is presented or created.
Uses HTTPS to connect to Tealium for greater security.
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:
Ideally you would have a separate Profile dedicated to your app.
You may also include the source code as a separate project in your solution.
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.
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:
this.AutoTrackingPageViews=false;
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:
TealiumTagger.Instance.TrackItemClicked(itemId);
TealiumTagger.Instance.TrackCustomEvent(eventVarName);
<common:LayoutAwarePage
x:Name="pageRoot" xmlns:tealium="using:Tealium" >
<GridView
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:TealiumEvent>
</tealium:TealiumEventBehavior.Event> ...
</GridView>
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.
To minimize the need to customize the library, a variety of settings are provided to tailor it to different applications' needs.
Copyright All Rights Reserved © 2008-2023