I have a problem with Google Tracker. After the official Google documentation to develop documentation I add an xml file with my identifier. After that, I create a new Tracker and try to push a new event, but the "sendevent" method does not exist.
this is my code
Import:
import com.google.analytics.tracking.android.EasyTracker;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.google.analytics.tracking.android.Tracker;
// I think I need to import the tracker
and simple code
Long opt_value;
Tracker MyTracker;
MyTracker.sendEvent("ui_action", "button_press", "play_button", opt_value);
And the error:
The method sendEvent(String, String, String, Long) is undefined for the type Tracker
Thanks everyone and sorry for my bad english
Edit: Now I'm trying with
MyTracker.send(MapBuilder
.createEvent("evt",
"Id",
""+idSong,
null).build()
);
but on logcat I have: 08-20 10: 45: 35.320: I / GAV3 (5371): Thread [GAThread, 5, main]: No campaign data found.
source
share