Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Google Sign-in API'sinin desteğinin sonlandırılmasının ardından, 2026'da Games v1 SDK'sını kaldırıyoruz. Şubat 2025'ten sonra, games v1 SDK'sına yeni entegre edilmiş oyunları Google Play'de yayınlayamazsınız. Bunun yerine games v2 SDK'sını kullanmanızı öneririz.
Önceki oyunların v1 entegrasyonlarına sahip mevcut oyunlar birkaç yıl boyunca çalışmaya devam edecek olsa da Haziran 2025'ten itibaren v2'ye geçiş yapmanızı öneririz.
Bu kılavuz, Play Games Hizmetleri v1 SDK'sının kullanımıyla ilgilidir. Play Games Hizmetleri v2 için C++ SDK'sı henüz kullanıma sunulmamıştır.
Oyuncu İstatistikleri API'si, oyun deneyimlerini belirli oyuncu segmentlerine ve oyuncu yaşam döngüsünün farklı aşamalarına göre özelleştirmenize olanak tanır. Oyuncuların ilerleme durumuna, harcamalarına ve etkileşimlerine göre her oyuncu segmenti için özel deneyimler oluşturabilirsiniz. Örneğin, daha az aktif olan bir oyuncuyu oyununuzla yeniden etkileşime geçmeye teşvik etmek için proaktif işlemler yapmak üzere bu API'yi kullanabilirsiniz. Örneğin, oyuncu oturum açtığında yeni oyun içi öğeleri göstererek ve tanıtarak bu işlemi yapabilirsiniz.
Bu kılavuzda, Player Stats API'nin doğal bir C++ veya Objective-C uygulamasında nasıl kullanılacağı gösterilmektedir.
Oyuncu istatistikleri hakkında temel bilgiler
Oyuncu istatistikleri API'lerini kullanarak oyuncuların oyun içi etkinlikleriyle ilgili verileri alabilirsiniz. Ayıklayabileceğiniz oyuncu verisi türleri şunlardır:
Ortalama oturum süresi: Oynatıcının dakika cinsinden ortalama oturum süresi. Oturum süresi, oyuncunun Google Play Oyun Hizmetleri'nde oturum açtığı süreye göre belirlenir.
Uygulamayı kullanmayı bırakma olasılığı: Bir oyuncunun ertesi gün uygulamayı kullanmayı bırakıp bırakmayacağının tahminidir. 0 (uygulamayı kullanmayı bırakma olasılığı düşük) veya 1 (uygulamayı kullanmayı bırakma olasılığı yüksek) olarak gösterilir. Kaybetme, 7 gün boyunca işlem yapılmaması olarak tanımlanır.
Son oynama tarihinden bu yana geçen gün sayısı: Oyuncunun son oynama tarihinden bu yana geçen yaklaşık gün sayısı.
Satın alma sayısı: Oyuncu için yaklaşık uygulama içi satın alma işlemi sayısı.
Oturum sayısı: Oynatıcının yaklaşık oturum sayısı.
Oturumlar, bir oyuncunun Google Play Games Hizmetleri'nde oturum açma sayısının toplamına göre belirlenir.
Oturum yüzdesi: Oyuncu için oturum yüzdesinin yaklaşık değeridir. 0 ile 1 arasında (ikisi de dahil) bir ondalık değer olarak gösterilir. Bu değer, mevcut oyuncunun oyunun oyuncu tabanının geri kalanına kıyasla kaç oturum oynadığını gösterir. Daha yüksek sayılar, bu oyuncunun daha fazla oturum oynadığını gösterir.
Harcama yüzdelik dilimi: 0 ile 1 arasında (dahil) bir ondalık değer olarak verilen, oyuncunun yaklaşık harcama yüzdelik dilimi. Bu değer, mevcut oyuncunun oyunun oyuncu tabanının geri kalanına kıyasla ne kadar harcama yaptığını gösterir. Daha yüksek sayılar, bu oyuncunun daha fazla harcama yaptığını gösterir.
C++ ile oturumu açık olan bir oyuncunun istatistiklerini alma
// Create the callback for our asynchronous fetch call. This callback will// log either an error or the average session length for the currently// signed-in player.gpg::StatsManager::FetchForPlayerCallbackcallback=[](gpg::StatsManager::FetchForPlayerResponseconst&response){if(IsError(response.status)){LogE("An error occurred fetching player stats.");}else{gpg::PlayerStatsconst & player_stats=response.data;if(player_stats.HasAverageSessionLength()){LogI("Average session length: %f",player_stats.AverageSessionLength());}else{LogW("Currently signed-in player had no associated average session length stats.");}}};// Asynchronously fetch the Player Stats. When the fetch is finished it// will call our callback. game_services_ is the std::unique_ptr<GameServices>// returned by gpg::GameServices::Builder.Create()game_services_->Stats().FetchForPlayer(callback);
Objective-C ile oturumu açık olan bir oyuncunun istatistiklerini alma
// Asynchronously fetches the Player Stats and then logs either a// description of them or an error[GPGPlayerStatsplayerStatsWithCompletionHandler:^(GPGPlayerStats*playerStats,NSError*error){if(error){NSLog(@"Error fetching player stats: %@",error);}else{NSLog(@"Description of stats for the currently signed-in player: %@",playerStats);}}];
Oyuncu istatistikleri verilerini kullanmayla ilgili ipuçları
Play Stats API, etkileşim ve harcama davranışlarına göre çeşitli oyuncu türlerini kolayca tanımlamanıza ve oyun deneyimlerini iyileştirmek için uygun stratejiler uygulamanıza olanak tanır.
Aşağıdaki tabloda, bazı örnek oyuncu segmentleri ve önerilen etkileşim stratejileri listelenmiştir:
Oynatıcı Segmenti
Etkileşim stratejisi
Çok sayıda oturum ve iyi harcama yüzdesine sahip ancak son bir hafta veya daha uzun süredir oyun oynamayan sık oyuncular.
Oyuna geri döndüklerinde yararlanabilecekleri indirim veya özel bonus hakkında bildirim gönderin.
Etkileyici başarıları vurgulayan bir yeniden karşılama mesajı gösterin ve oyuna geri dönmeyi teşvik etmek için tasarlanmış bir rozet verin.
Düşük harcama yüzdelik diliminde olan, etkileşimi yüksek oyuncular.
Arkadaşlarını oyununuzu indirip katılmaya davet etmeleri için teşvik edecek bonuslar sunun. Bu yaklaşım, yeni oyuncular çekmek için oyuncunun oyundan aldığı keyfi temel alır.
Harcamalarının zirveye ulaştığını ve daha az oynamaya başladığına dair işaretler gösteren yüksek harcama yapan oyuncular
Yüksek değerli, kısa süreli araçlar, silahlar veya indirimler sunarak kullanıcıların ilgisini canlı tutmak için bonusları özelleştirin.
Oyuncu bir sonraki sefer oturum açtığında, onu daha sık ve daha uzun süreli etkileşim sağlayan klan saldırıları gibi topluluk özelliklerine yönlendiren bir video gösterin.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Add player stats to your game\n\nFollowing the deprecation of the\n[Google Sign-In](https://android-developers.googleblog.com/2024/09/streamlining-android-authentication-credential-manager-replaces-legacy-apis.html)\nAPI, we are removing the games v1 SDK in 2026. After February 2025, you will be unable to publish\ntitles that are newly integrated with games v1 SDK, on Google Play. We recommend that you use the\ngames v2 SDK instead. \n\nWhile existing titles with the previous games v1 integrations continue to function for a\ncouple of years, you are encouraged to\n[migrate to v2](/games/pgs/android/migrate-to-v2)\nstarting June 2025. \n\nThis guide is for using the Play Games Services v1 SDK. The C++ SDK for\nPlay Games Services v2 is not yet available.\n\nThe Player Stats API let you tailor game experiences to specific segments of\nplayers and different stages of the player lifecycle. You can build tailored\nexperiences for each player segment based on how players are progressing,\nspending, and engaging. For example, you can use this API to take proactive\nactions to encourage a less active player to re-engage with your game, such as\nby displaying and promoting new in-game items when the player signs in.\n\nThis guide shows you how to use the Player Stats API in a native C++ or\nObjective-C application.\n\nPlayer stats basics\n-------------------\n\nYou can use the Player Stats APIs to retrieve data about a player's in-game\nactivity. The types of player data you can retrieve include:\n\n- **Average session length**: The average session length of the player in minutes. Session length is determined by the time that a player is signed in to Google Play Games services.\n- **Churn probability**: The prediction of whether a player will churn in the next day, given as 0 (low probability of churn) or 1 (high probability of churn). Churn is defined as 7 days of inactivity.\n- **Days since last played**: The approximate number of days since the player last played.\n- **Number of purchases**: The approximate number of in-app purchases for the player.\n- **Number of sessions**: The approximate number of sessions of the player. Sessions are determined by the number of times that a player signs in to Google Play Games services.\n- **Session percentile**: The approximation of sessions percentile for the player, given as a decimal value between 0 and 1 (inclusive). This value indicates how many sessions the current player has played in comparison to the rest of this game's player base. Higher numbers indicate that this player has played more sessions.\n- **Spend percentile**: The approximate spend percentile of the player, given as a decimal value between 0 and 1 (inclusive). This value indicates how much the current player has spent in comparison to the rest of this game's player base. Higher numbers indicate that this player has spent more.\n\nGet player stats for a currently signed-in player with C++\n----------------------------------------------------------\n\n // Create the callback for our asynchronous fetch call. This callback will\n // log either an error or the average session length for the currently\n // signed-in player.\n gpg::StatsManager::FetchForPlayerCallback callback = [](gpg::StatsManager::FetchForPlayerResponse const &response) {\n if (IsError(response.status)) {\n LogE(\"An error occurred fetching player stats.\");\n } else {\n gpg::PlayerStats const & player_stats = response.data;\n if (player_stats.HasAverageSessionLength()) {\n LogI(\"Average session length: %f\", player_stats.AverageSessionLength());\n } else {\n LogW(\"Currently signed-in player had no associated average session length stats.\");\n }\n }\n };\n // Asynchronously fetch the Player Stats. When the fetch is finished it\n // will call our callback. game_services_ is the std::unique_ptr\u003cGameServices\u003e\n // returned by gpg::GameServices::Builder.Create()\n game_services_-\u003eStats().FetchForPlayer(callback);\n\nGet player stats for a currently signed-in player with Objective-C\n------------------------------------------------------------------\n\n // Asynchronously fetches the Player Stats and then logs either a\n // description of them or an error\n [GPGPlayerStats playerStatsWithCompletionHandler:^(GPGPlayerStats *playerStats, NSError *error) {\n if (error) {\n NSLog(@\"Error fetching player stats: %@\", error);\n } else {\n NSLog(@\"Description of stats for the currently signed-in player: %@\", playerStats);\n }\n }];\n\nTips for using player stats data\n--------------------------------\n\nThe Play Stats API lets you easily identify various types of players, based on\ntheir engagement and spending behavior, and apply appropriate strategies to\nenhance their game experience.\n\nThe following table lists some example player segments and recommended\nengagement strategies:\n\n| Player Segment | Engagement Strategy |\n|---------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Frequent players with a high number of sessions and good spend percentile, but have not played for the last week or more. | - Send a notification about a discount or special bonus available upon their return to play. - Show a welcome back message that acknowledges impressive accomplishments, and award a badge designed to encourage return play. |\n| Highly engaged players in a low spend percentile. | - Tailor bonuses to incentivize them to invite their friends to install and join your game. This approach builds on the player's demonstrated enjoyment of the game to recruit new players. |\n| High spending players showing signs of having peaked and starting to play less frequently. | - Tailor bonuses to freshen their interest, such as by offering high-value, short-duration tools, weapons, or discounts. - The next time the player signs in, show a video that directs them to community features, like clan attacks, that drive more frequent and longer engagement. |"]]