The achievement unlocked event occurs when a user gets access to a new achievement (for example, finds a secret key in a gaming app). This event also shows the user engagement and can identify the skill level of the user in the game. You can also use the EventAttribute1 parameter with this event to store the name of unlocked achievement.
- User ID (recommended)
- Facebook User ID (recommended if authentication with Facebook)
- Twitter User ID (recommended if authentication with Twitter)
- Google User ID (recommended if authentication with Google)
- Name/ID of Achievement set with EventContentId or EventAttribute 1 (required)
Achievement Unlocked Adobe Air Plugin Version 5.0
Tune.instance.setFacebookUserId("facebookUserId");
Tune.instance.setGoogleUserId("googleUserId");
Tune.instance.setTwitterUserId("twitterUserId");
var tuneEvent:Dictionary = new Dictionary();
tuneEvent.name = "achievement_unlocked";
tuneEvent.contentId = "winning streak";
Tune.instance.measureEvent(tuneEvent);
Achievement Unlocked Adobe Air Plugin Version 4.0
mobileAppTracker.setFacebookUserId("facebookUserId");
mobileAppTracker.setGoogleUserId("googleUserId");
mobileAppTracker.setTwitterUserId("twitterUserId");
var matEvent:Dictionary = new Dictionary();
matEvent.name = "achievement_unlocked";
matEvent.contentId = "winning streak";
mobileAppTracker.measureEvent(matEvent);
Achievement Unlocked Android SDK Version 6.0+
ITune tune = Tune.getInstance();
tune.setFacebookUserId("facebookUserId");
tune.setGoogleUserId("googleUserId");
tune.setTwitterUserId("twitterUserId");
tune.measureEvent(new TuneEvent(TuneEvent.ACHIEVEMENT_UNLOCKED).withContentId("winning streak"));
Achievement Unlocked Android SDK Version 4.0+
Tune tune = Tune.getInstance();
tune.setFacebookUserId("facebookUserId");
tune.setGoogleUserId("googleUserId");
tune.setTwitterUserId("twitterUserId");
tune.measureEvent(new TuneEvent(TuneEvent.ACHIEVEMENT_UNLOCKED).withContentId("winning streak"));
Achievement Unlocked Cocos2dx Plugin Version 3.9
sdkbox::PluginTune::setUserId("userId");
sdkbox::PluginTune::setFacebookUserId("facebookUserId");
sdkbox::PluginTune::setGoogleUserId("googleUserId");
sdkbox::PluginTune::setTwitterUserId("twitterUserId");
TuneEvent event;
event.eventName = "achievement_unlocked";
event.contentId = "winning streak";
sdkbox::PluginTune::measureEvent(event);
Achievement Unlocked iOS SDK Version 4.7-3.10
[Tune setUserId:@"US13579"];
[Tune setFacebookUserId:@"321321321321"];
[Tune setGoogleUserId:@"11223344556677"];
[Tune setTwitterUserId:@"1357924680"];
TuneEvent *event = [TuneEvent eventWithName:TUNE_EVENT_ACHIEVEMENT_UNLOCKED];
event.contentId = @"achievementId123";
[Tune measureEvent:event];
Achievement Unlocked Javascript SDK Version 3.2
MobileAppTracker.setUserId("userId");
MobileAppTracker.setFacebookUserId("facebookUserId");
MobileAppTracker.setGoogleUserId("googleUserId");
MobileAppTracker.setTwitterUserId("twitterUserId");
MobileAppTracker.setEventContentId("winning streak");
MobileAppTracker.measureAction({"eventName": "achievement_unlocked"});
Achievement Unlocked PhoneGap Plugin Version 5.0.0
window.plugins.tunePlugin.setFacebookUserId("facebookUserId");
window.plugins.tunePlugin.setGoogleUserId("googleUserId");
window.plugins.tunePlugin.setTwitterUserId("twitterUserId");
var tuneEvent = {
"name": "achievement_unlocked",
"contentId": "winning streak"
};
window.plugins.tunePlugin.measureEvent(tuneEvent);
Achievement Unlocked PhoneGap Plugin Version 3.8+
mobileAppTracker.setFacebookUserId("facebookUserId");
mobileAppTracker.setGoogleUserId("googleUserId");
mobileAppTracker.setTwitterUserId("twitterUserId");
var matEvent = {
"name": "achievement_unlocked",
"contentId": "winning streak"
};
mobileAppTracker.measureEvent(matEvent);
Achievement Unlocked Unity Plugin Version 4.0.0+
using TuneSDK;
Tune.SetFacebookUserId("facebookUserId");
Tune.SetGoogleUserId("googleUserId");
Tune.SetTwitterUserId("twitterUserId");
TuneEvent tuneEvent = new TuneEvent("achievement_unlocked");
tuneEvent.contentId = "winning streak";
Tune.MeasureEvent(tuneEvent);
Achievement Unlocked Unity Plugin Version 3.8+
MATBinding.SetFacebookUserId("facebookUserId");
MATBinding.SetGoogleUserId("googleUserId");
MATBinding.SetTwitterUserId("twitterUserId");
MATEvent matEvent = new MATEvent("achievement_unlocked");
matEvent.contentId = "winning streak";
MATBinding.MeasureEvent(matEvent);
Achievement Unlocked Windows SDK Version 3.2
mobileAppTracker.SetUserId("userId");
mobileAppTracker.SetFacebookUserId("facebookUserId");
mobileAppTracker.SetGoogleUserId("googleUserId");
mobileAppTracker.SetTwitterUserId("twitterUserId");
mobileAppTracker.SetEventContentId("winning_streak");
mobileAppTracker.MeasureAction("achievement_unlocked");
Achievement Unlocked Xamarin Plugin Version for iOS
using TuneSDK;
Tune.SetFacebookUserId("facebookId");
Tune.SetGoogleUserId("googleId");
Tune.SetTwitterUserId("twitterId");
TuneEvent evt = TuneEvent.EventWithName ("achievement_unlocked");
evt.ContentId = achievementId;
Tune.MeasureEvent (evt);
Achievement Unlocked Xamarin Plugin Version for Android
Tune.Instance.SetFacebookUserId("facebookUserId");
Tune.Instance.SetGoogleUserId("googleUserId");
Tune.Instance.SetTwitterUserId("twitterUserId");
TuneEvent event = new TuneEvent(TuneEvent.AchievementUnlocked).WithContentId("winning streak"));
Tune.Instance.MeasureEvent(event);
Achievement Unlocked Missing Code Example
Unable to load code example.
Achievement Unlocked
Select a preferred platform.