以下是我们在 I/O 大会上宣布的所有内容,从新的 Firebase Studio 功能到集成 AI 的更多方式,内容非常丰富。
阅读博客。
অ্যাপ-মধ্যস্থ কেনাকাটা পরিমাপ করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অ্যাপ-মধ্যস্থ কেনাকাটা (IAP) হল ডিজিটাল সামগ্রী বা বৈশিষ্ট্য যা আপনি Google Play বা Apple App Store এর মাধ্যমে মোবাইল অ্যাপে বিক্রি করতে পারেন যাতে আপনার অ্যাপটিকে আর্থিক লেনদেন প্রক্রিয়া করতে না হয়। অ্যাপ-মধ্যস্থ কেনাকাটার উদাহরণগুলির মধ্যে সদস্যতা-ভিত্তিক সামগ্রী বা বিশেষ গেমের অংশগুলি অন্তর্ভুক্ত রয়েছে।
Analytics ইন-অ্যাপ কেনাকাটার রিপোর্টে IAP ইভেন্ট দেখায়।
অ্যান্ড্রয়েড অ্যাপ্লিকেশানগুলির জন্য, Analytics SDK Google Play সাথে একীভূত হয়৷ অ্যাপল প্ল্যাটফর্ম অ্যাপের জন্য, SDK অ্যাপলের স্টোরকিট 1 এবং স্টোরকিট 2 API ব্যবহার করে অ্যাপল অ্যাপ স্টোরের সাথে একীভূত হয়।
বেশিরভাগ ক্ষেত্রে, Analytics SDK স্বয়ংক্রিয়ভাবে আপনার অ্যাপে API কলের প্রয়োজন ছাড়াই IAP ইভেন্ট সংগ্রহ করে। এই নির্দেশিকাটি ব্যাখ্যা করে যে কীভাবে স্বয়ংক্রিয় ট্র্যাকিংয়ের জন্য আপনার প্রকল্প সেট আপ করতে হয় এবং এটি কিছু বিশেষ ক্ষেত্রে বর্ণনা করে যেগুলি বাস্তবায়নের জন্য কোডের কয়েকটি লাইন প্রয়োজন।
আপনি শুরু করার আগে
আপনি যদি একটি অ্যান্ড্রয়েড অ্যাপ তৈরি করেন, আপনি Google Play তে লিঙ্ক করার সাথে সাথে আপনি IAP ইভেন্টগুলি পরিমাপ করতে পারেন৷ এই গাইডের বাকি অংশটি অ্যাপল প্ল্যাটফর্ম অ্যাপগুলিতে ফোকাস করা হয়েছে।
আপনি যদি একজন Apple ডেভেলপার হন, তাহলে Apple ডকুমেন্টেশন পর্যালোচনা করে নিশ্চিত করুন যে আপনি Apple StoreKit 1 এবং StoreKit 2 অ্যাপ-মধ্যস্থ কেনাকাটার APIগুলির সাথে পরিচিত৷
বাস্তবায়ন
সুইফট
আপনি যদি স্টোরকিট 1 ব্যবহার করেন, তাহলে Analytics SDK স্বয়ংক্রিয়ভাবে IAP ইভেন্টগুলি লগ করে।
আপনি যদি স্টোরকিট 2 ব্যবহার করেন তবে IAP ইভেন্টগুলি লগ করতে নিম্নলিখিত কোডটি ব্যবহার করুন৷
import StoreKit
import FirebaseAnalytics
// A user tapped a button to purchase an item.
func userTappedPurchaseUpgradeButton() {
let product = ...
purchaseSomeProduct(product)
}
func purchaseSomeProduct(_ product: Product) {
// Purchase a Product. This is mostly standard boilerplate StoreKit 2
// code, except for the Analytics.logTransaction() call.
let result = try await product.purchase()
switch result {
case .success(let verification):
let transaction = try checkVerified(verification)
// Call this Firebase API to log the in-app purchase event.
Analytics.logTransaction(transaction)
await transaction.finish()
...
}
উদ্দেশ্য-C
আপনি যদি স্টোরকিট 1 ব্যবহার করেন, তাহলে Analytics SDK স্বয়ংক্রিয়ভাবে IAP ইভেন্টগুলি লগ করে।
স্টোরকিট 2 শুধুমাত্র সুইফট, তাই একটি উদ্দেশ্য-সি বাস্তবায়ন সমর্থিত নয়।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-15 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-15 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["In-app purchases (IAP) are digital content or features that you can sell in a\nmobile app through Google Play or the Apple App Store so your app doesn't\nhave to process financial transactions. Examples of in-app purchases include\nsubscription-based content or special game pieces.\n\nAnalytics shows IAP events in the\n[In-app purchases report](https://support.google.com/analytics/answer/12923440).\n\nFor Android apps, the Analytics SDK integrates with Google Play. For Apple\nplatform apps, the SDK integrates with the Apple App Store using the\nStoreKit 1 and StoreKit 2 APIs from Apple.\n\nIn most cases, the Analytics SDK automatically collects IAP events without\nrequiring API calls in your app. This guide explains how to set up your project\nfor automatic tracking, and it describes some special cases that require a few\nlines of code to implement.\n\nBefore you begin\n\n- Set up your Firebase project and your app's codebase as described in\n [Get Started with Google Analytics](/docs/analytics/get-started).\n\n- [Link your Firebase project to a Google Analytics 4 property.](https://support.google.com/firebase/answer/9289399)\n\n- For Apple platform apps:\n\n - Make sure that your app is using the Analytics SDK v6.20.0+.\n- For Android apps:\n\n - Make sure that your app is using the Analytics SDK v17.3.0+ (or Firebase Android BoM v25.2.0+).\n - [Link your Firebase apps to Google Play](https://support.google.com/firebase/answer/6392038).\n\nIf you're developing an Android app, you can measure IAP events as soon as you\nlink to Google Play. The remainder of this guide is focused on Apple platform\napps.\n\nIf you're an Apple developer, make sure you're familiar with the Apple StoreKit\n1 and StoreKit 2 in-app purchase APIs by reviewing the\n[Apple documentation](https://developer.apple.com/documentation/storekit/in-app_purchase).\n\nImplementation \n\nSwift\n\nIf you're using StoreKit 1, the Analytics SDK automatically logs\nIAP events.\n\nIf you're using StoreKit 2, use the following code to log IAP events. \n\n```swift\nimport StoreKit\nimport FirebaseAnalytics\n\n// A user tapped a button to purchase an item.\nfunc userTappedPurchaseUpgradeButton() {\n let product = ...\n purchaseSomeProduct(product)\n}\n\nfunc purchaseSomeProduct(_ product: Product) {\n // Purchase a Product. This is mostly standard boilerplate StoreKit 2\n // code, except for the Analytics.logTransaction() call.\n let result = try await product.purchase()\n switch result {\n case .success(let verification):\n let transaction = try checkVerified(verification)\n\n // Call this Firebase API to log the in-app purchase event.\n Analytics.logTransaction(transaction)\n\n await transaction.finish()\n ...\n}\n```\n\nObjective-C\n\nIf you're using StoreKit 1, the Analytics SDK automatically logs\nIAP events.\n\nStoreKit 2 is Swift-only, so an Objective-C implementation is not supported.\n\nKotlin\n\nTo log IAP events,\n[link to Google Play](//support.google.com/firebase/answer/6392038).\n\nJava\n\nTo log IAP events,\n[link to Google Play](//support.google.com/firebase/answer/6392038)."]]