简体   繁体   中英

In Google Analytics Android app, Is there something called non session events?

Say, there is a background service in app, which fires event on analytics. Now i don't want that event to create a session on Google analytics.

Is there any way?

This can be achieved by using .setNonIntraction(true) in your analytics tracking.

Tracker t = getGoogleTracker();
t.send(new HitBuilders.EventBuilder().setCategory(category)
.setAction(event)
.setLabel(label).setNonInteraction(true)
.setValue(l)
.build());

This works for me like a charm !!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM