Delegate tracker

 

Foreword

The instance of a tracker is accompanied by a delegate enabling you to track the tagging of your application. It is therefore easier to detect a problem or execute custom processes.

 

Use

Once your tag is initialised, you must assign the delegate property of the tracker to the instance of the class which implements the interface methods of the TrackerDelegate.

Example :

using ATInternet;
using Windows.UI.Xaml.Controls;
 
namespace AppTest
{
    public sealed partial class MainPage : Page, TrackerDelegate
    {
        Tracker _tracker;
        public void TrackerNeedsFirstLaunchApproval(string message)
        {
            // Do something
        }
 
        public void BuildDidEnd(HitStatus status, string message)
        {
            // Do something
        }
 
        public void SendDidEnd(HitStatus status, string message)
        {
            // Do something
        }
 
        public void DidCallPartner(string response)
        {
            // Do something
        }
 
        public void WarningDidOccur(string message)
        {
            // Do something
        }
 
        public void SaveDidEnd(string message)
        {
            // Do something
        }
 
        public void ErrorDidOccur(string message)
        {
            // Do something
        }
        
 
        public MainPage()
        {
            InitializeComponent();
 
            _tracker = SmartTag.Instance.defaultTracker;
            _tracker.Delegate = this;
        }
    }
}

 

 

Protocole TrackerDelegate

 

Méthodes optionnelles

NameReturn typeSettingsDescription
TrackerNeedsFirstLaunchApprovalvoidmessageEvent triggered when the tracker was first initialised.
BuildDidEndvoidstatus, messageEvent triggered at the end of construction of a hit
SendDidEndvoidstatus, messageEvent triggered at the end of sending a hit
SaveDidEndvoidmessageEvent triggered when saving a hit
DidCallPartnervoidresponseEvent triggered once the partner’s response was received
WarningDidOccurvoidmessageEvent triggered when a tagging problem occurred (non-blocking for sending the hit)
ErrorDidOccurvoidmessageEvent triggered when a tagging problem occurred (blocked the hit from sending)
 

Was this post helpful?

Last update: 27/09/2016