SmartTag migration guide

 

Preliminary declaration

Before Previously, it was necessary to initialize tag at the opening of the application:

ATTag.init(this, "YOURLOG", "YOURSITEID", ATTag.IdentifierType.ANDROID_ID);

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:

  1. With ATInternet class
    // From TagComposer
    Tracker tracker = ATInternet.getInstance().getDefaultTracker();
    
    // From other source
    Tracker tracker = ATInternet.getInstance().getTracker("myTracker", new HashMap<String, Object>() {{
        put("log", "YOURLOG");
        put("logSSL", "YOURSSLLOG");
        put("site", YOURSITEID);
    }});
  2. Without ATInternet class
    // From TagComposer
    Tracker tracker = new Tracker(this);
    
    // From other source
    tracker = new Tracker(this, new HashMap<String, Object>() {{
        put("log", "YOURLOG");
        put("logSSL", "YOURSSLLOG");
        put("site", YOURSITEID);
    }});
Tracker initialisation >  

Hits sending

Before With SDK V1, hits we were sent via the following method:

ATParams params = new ATParams();
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
tracker.Screens().add("Pagename", "Chapter1", "Chapter2", "Chapter3").setLevel2(10);

// Second method
tracker.Screens().add("Pagename")
                .setChapter1("Chapter1")
                .setChapter2("Chapter2")
                .setChapter3("Chapter3")
                .setLevel2(10);
Screens >  

Click tag

Before

params.xt_click("15", "Chapter1::Chapter2::Chapter3::Clickname", ATParams.clicType.navigation);

SmartTag 

// First Method
tracker.Gestures().add("Clickname", "Chapter1", "Chapter2", "Chapter3").setLevel2(15).sendNavigation();

// Second Method
tracker.Gestures().add("Clickname")
                 .setChapter1("Chapter1")
                 .setChapter2("Chapter2")
                 .setChapter3("Chapter3")
                 .setLevel2(15)
                 .sendNavigation();
Gestures >
Was this post helpful?
Yes
No
Last update: 05/04/2018