alebianco / ANE-Google-Analytics

Air Native Extension for Google Analytics on iOS and Android
http://alebianco.github.io/ANE-Google-Analytics/
MIT License
133 stars 44 forks source link

How to include DEVICE_ID to track devices through different sessions? #63

Open jpablogn opened 9 years ago

jpablogn commented 9 years ago

Hello,

I am using your ANE for tracking "pages" and "events" in Google Analytics:

// pages tracker.buildView("/home").track();

// events tracker.buildEvent("click", "play").track();

I would like to unify sessions of the same device by using a device identifier (DEVICE_ID): https://support.google.com/analytics/answer/3123662

Google Analytics ask you to use this piece of code in order to provide an user id from devices: ga(‘set’, ‘&uid’, {{USER_ID}});

Right now I am using following code but I do not know how to include DEVICE_ID:

    var analytics:Analytics = Analytics.getInstance();
    var tracker:ITracker = analytics.getTracker(ANALYTICS_ID);
    tracker.buildEvent("click", "play").track();

How can I include DEVICE_ID?

Thank you. J. Pablo.

alebianco commented 9 years ago

Hi Pablo, It's not possible at the moment but it's a feature planned for the next release.