Developers » Windows » Getting started » SmartTag migration guide
SmartTag migration guide
Preliminary declaration
Before Previously, it was necessary to initialize tag at the opening of the application:
ATTag attag = new ATTag("YOURSITEID", "YOURLOG", offlineMode.offlineModeRequired);
SmartTag With SmartTag, it is necessary to instantiate the Tracker you will work wih. In order to do so, you need to add this ligne before your tagging:
// With configuration file Tracker _tracker = SmartTag.Instance.defaultTracker // Without configuration file Tracker _tracker = SmartTag.Instance.GetTracker("MyTracker", new Dictionary<string, string>() { { "log","YOURLOG"}, { "logSSL","YOURSSLLOG"}, { "site","YOURSITEID"} });Tracker initialisation >
Hits sending
Before With SDK V1, hits we were sent via the following method:
ATParams params = new ATParams(attag); params.xt_sendTag();
SmartTag With SmartTag, hits are sent via the following method:
_tracker.Dispatch();
With .send* helpers, hits are sent when the method call.
Operating principle >Define page information
Before
params.setLevel2("10"); params.setPage("Chapter1::Chapter2::Chapter3::Pagename");
SmartTag
// First method Screen screen = tracker.Screens.Add("Pagename", "Chapter1", "Chapter2", "Chapter3"); screen.Level2 = 10; // Second method Screen screen = tracker.Screens.Add("Pagename"); screen.Chapter1 = "Chapter1"; screen.Chapter2 = "Chapter2"; screen.Chapter3 = "Chapter3"; screen.Level2 = 10;Screens >
Click tag
Before
params.xt_click("15", "ClickChapter1::ClickChapter2::ClickChapter3::Clickname", ATParams.clicType.navigation);
SmartTag
// First method Gesture gesture = tracker.Gestures.Add("Clickname", "Chapter1", "Chapter2", "Chapter3"); gesture.Level2 = 10; // Second method Gesture gesture = tracker.Gestures.Add("Clickname"); gesture.Chapter1 = "Chapter1"; gesture.Chapter2 = "Chapter2"; gesture.Chapter3 = "Chapter3"; gesture.Level2 = 10;Gestures > Last update: 09/06/2017