Last active
August 29, 2015 14:15
-
-
Save npruehs/b27519e1f94ddcb86384 to your computer and use it in GitHub Desktop.
Game Analytics Windows 10 UWP Test Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sandbox. | |
//this->ga = std::make_shared<GameAnalytics::GameAnalyticsInterface>(L"5c6bcb5402204249437fb5a7a80a4959", L"16813a12f718bc5c620f56944e1abc3ea13ccbac"); | |
// Production. | |
this->ga = std::make_shared<GameAnalytics::GameAnalyticsInterface>(L"a6d2a92e3572aebadead9b477441a246", L"8a429b59cd53dfccd063205b501b869b99e7e6e9"); | |
this->ga->Init().then([this](JsonObject^ response) | |
{ | |
this->ga->SendUserEvent(GameAnalytics::User()); | |
// == BUSINESS == | |
this->ga->SendBusinessEvent(L"ItemType:ItemId", L"EUR", 100); | |
this->ga->SendBusinessEvent(L"ItemType:ItemId", L"EUR", 100, L"menu_shop"); | |
// == RESOURCE == | |
this->ga->SendResourceEvent(GameAnalytics::FlowType::FlowType::Source, L"Gold", L"Sword", L"Dagger", 400.0f); | |
// == PROGRESSION == | |
this->ga->SendProgressionEvent(GameAnalytics::ProgressionStatus::ProgressionStatus::Start, L"Level2"); | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent1"); | |
this->ga->SendProgressionEvent(GameAnalytics::ProgressionStatus::ProgressionStatus::Complete, L"Level2", 40); | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent2"); | |
this->ga->SendProgressionEvent(GameAnalytics::ProgressionStatus::ProgressionStatus::Start, L"Level3"); | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent3"); | |
this->ga->SendProgressionEvent(GameAnalytics::ProgressionStatus::ProgressionStatus::Fail, L"Level3", 50); | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent4"); | |
// == DESIGN == | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent"); | |
this->ga->SendDesignEvent(L"TestEventType:TestEvent", 12.0f); | |
// == ERROR == | |
this->ga->SendErrorEvent(L"Exception:NullReference", GameAnalytics::Severity::Severity::Debug); | |
// == SESSION END == | |
this->ga->SendSessionEndEvent(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment