প্রথম ধাপ হল ব্যবহারকারীদের তাদের ইমেল ঠিকানা বা ফোন নম্বর প্রদান করার জন্য একটি সাইন-ইন অভিজ্ঞতা বাস্তবায়ন করা।
আপনি যে প্রমাণীকরণ সিস্টেমটি ব্যবহার করেন সেটি অবশ্যই ব্যবহারকারীর সাথে যুক্ত একটি ইমেল ঠিকানা বা ফোন নম্বর প্রদান করবে। নিম্নলিখিত পদক্ষেপগুলি Firebase Authentication ব্যবহার করে নিরাপদে সাইন-ইন তথ্য সংগ্রহ করার প্রক্রিয়ার রূপরেখা দেয়, কিন্তু আপনি যদি ইতিমধ্যেই ব্যবহারকারীর ইমেল বা ফোন নম্বর সংগ্রহ করে এমন একটি প্রমাণীকরণ সিস্টেম থাকে এবং ধাপ 2: Google Analytics ইন্টিগ্রেট করতে চালিয়ে যান তাহলে আপনি এই ধাপটি এড়িয়ে যেতে পারেন।
নিশ্চিত করুন যে আপনার এই টিউটোরিয়ালের জন্য পূর্বশর্ত রয়েছে
আপনার নিজস্ব অ্যাপ যা iOS 12 বা উচ্চতর সংস্করণে চলতে পারে
আপনার অ্যাপটি একটি Firebase অ্যাপ হিসেবে নিবন্ধিত হয়েছে যা Google Analytics এবং বিজ্ঞাপনের সাথে লিঙ্ক করা আছে
আপনার পছন্দের IDE
একটি প্রমাণীকরণ সিস্টেম সেট আপ করুন
একটি Firebase Authentication সাইন-ইন পদ্ধতি ব্যবহার করুন
ইমেল ঠিকানা, ফোন নম্বর, পাসওয়ার্ড সাইন-ইন এবং ফেডারেটেড পরিচয় প্রদানকারী (যেমন Google, Facebook বা Twitter) সহ এক বা একাধিক সাইন-ইন পদ্ধতি ব্যবহার করে ব্যবহারকারীদের আপনার অ্যাপে সাইন ইন করার অনুমতি দিতে আপনি Firebase Authentication ব্যবহার করতে পারেন। অনুগ্রহ করে পর্যালোচনা করুন Firebase Authentication সাথে শুরু করুন ।
একটি কাস্টম প্রমাণীকরণ সিস্টেমের সাথে Firebase Authentication একীভূত করুন
বিকল্পভাবে, কোনো ব্যবহারকারী সফলভাবে সাইন ইন করলে কাস্টম সাইনড টোকেন তৈরি করতে আপনি আপনার প্রমাণীকরণ সার্ভার পরিবর্তন করে একটি কাস্টম প্রমাণীকরণ সিস্টেমের সাথে Firebase Authentication একীভূত করতে পারেন। আপনার অ্যাপটি এই টোকেনটি গ্রহণ করে এবং Firebase এর সাথে প্রমাণীকরণের জন্য এটি ব্যবহার করে। অনুগ্রহ করে পর্যালোচনা করুন একটি কাস্টম প্রমাণীকরণ সিস্টেমের সাথে শুরু করুন ৷
প্রমাণীকৃত ব্যবহারকারীর ইমেল ঠিকানা বা ফোন নম্বর পান
আপনি Firebase Authentication সাথে একটি প্রমাণীকরণ সিস্টেম সেট আপ করার পরে, আপনি বর্তমানে সাইন-ইন করা ব্যবহারকারী পেতে পারেন।
বর্তমান ব্যবহারকারীকে পাওয়ার প্রস্তাবিত উপায় হল Auth অবজেক্টে একজন শ্রোতা সেট করে:
সুইফট
handle=Auth.auth().addStateDidChangeListener{auth,userin// Get the user's email addressletemail=user.email// or get their phone numberletphoneNumber=user.phoneNumber// ...}
উদ্দেশ্য-C
self.handle=[[FIRAuthauth]addAuthStateDidChangeListener:^(FIRAuth*_Nonnullauth,FIRUser*_Nullableuser){// Get the user's email addressNSString*email=user.email;// or get their phone numberNSString*phoneNumber=user.phoneNumber;// ...}];
ঐক্য
Firebase.Auth.FirebaseAuthauth;Firebase.Auth.FirebaseUseruser;// Handle initialization of the necessary firebase modules:voidInitializeFirebase(){auth=Firebase.Auth.FirebaseAuth.DefaultInstance;auth.StateChanged+=AuthStateChanged;AuthStateChanged(this,null);}// Track state changes of the auth object.voidAuthStateChanged(objectsender,System.EventArgseventArgs){if(auth.CurrentUser!=user){boolsignedIn=user!=auth.CurrentUser&&auth.CurrentUser!=null;user=auth.CurrentUser;if(signedIn){// Get the user's email addressstringemail=user.Email;// or get their phone numberstringphoneNumber=user.PhoneNumber;// ...}}}// Handle removing subscription and reference to the Auth instance.// Automatically called by a Monobehaviour after Destroy is called on it.voidOnDestroy(){auth.StateChanged-=AuthStateChanged;auth=null;}
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-09-06 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["Step 1: Implement a sign-in experience\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------|\n| Introduction: [Measure iOS Ads conversions](/docs/tutorials/ads-ios-on-device-measurement/index-first-party) |\n| **Step 1: Implement a sign-in experience** \u003cbr /\u003e |\n| Step 2: [Integrate Google Analytics](/docs/tutorials/ads-ios-on-device-measurement/step-2) |\n| Step 3: [Initiate on-device conversion measurement using Google Analytics](/docs/tutorials/ads-ios-on-device-measurement/step-3) |\n| Step 4: [Troubleshoot and handle common issues](/docs/tutorials/ads-ios-on-device-measurement/step-4) |\n\n\u003cbr /\u003e\n\nThe first step is to implement a sign-in experience to allow users to provide\ntheir email addresses or phone number.\n\n**The authentication system that you use must provide an email address or\nphone number associated with the user.** The following steps outline the process\nfor securely collecting sign-in information using Firebase Authentication, but you\ncan skip this step if you already have an authentication system that collects\nuser emails or phone numbers and continue to [Step 2: Integrate Google Analytics](/docs/tutorials/ads-ios-on-device-measurement/step-2).\n\n\u003cbr /\u003e\n\n**Make sure you have the prerequisites for this tutorial**\n\n\u003cbr /\u003e\n\n- Your own app that can run on iOS 12 or higher\n\n- Your app registered as a Firebase App that's linked to Google Analytics\n and Ads\n\n- Your preferred IDE\n\n \u003cbr /\u003e\n\n\u003cbr /\u003e\n\nSet up an authentication system\n\nUse a Firebase Authentication sign-in method\n\nYou can use Firebase Authentication to allow users to sign in to your app using one or\nmore sign-in methods, including email address, phone number, password sign-in,\nand federated identity providers (like Google, Facebook or Twitter).\nPlease review [Get started with Firebase Authentication](/docs/auth/ios/start).\n\nIntegrate Firebase Authentication with a custom authentication system\n\nAlternatively, you can integrate Firebase Authentication with a custom\nauthentication system by modifying your authentication server to produce custom\nsigned tokens when a user successfully signs in. Your app receives this token\nand uses it to authenticate with Firebase. Please review [Get started with a custom\nauthentication system](/docs/auth/ios/custom-auth).\n\nGet the authenticated user's email address or phone number\n\nAfter you've set up an authentication system with Firebase Authentication, you can\nget the currently signed-in user.\n\nThe recommended way to get the current user is by setting a listener on the\n`Auth` object: \n\nSwift \n\n```swift\nhandle = Auth.auth().addStateDidChangeListener { auth, user in\n // Get the user's email address\n let email = user.email\n // or get their phone number\n let phoneNumber = user.phoneNumber\n // ...\n}\n```\n\nObjective-C \n\n```objective-c\nself.handle = [[FIRAuth auth]\n addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user) {\n // Get the user's email address\n NSString *email = user.email;\n // or get their phone number\n NSString *phoneNumber = user.phoneNumber;\n // ...\n }];\n```\n\nUnity \n\n```c#\nFirebase.Auth.FirebaseAuth auth;\nFirebase.Auth.FirebaseUser user;\n\n// Handle initialization of the necessary firebase modules:\nvoid InitializeFirebase() {\n auth = Firebase.Auth.FirebaseAuth.DefaultInstance;\n auth.StateChanged += AuthStateChanged;\n AuthStateChanged(this, null);\n}\n\n// Track state changes of the auth object.\nvoid AuthStateChanged(object sender, System.EventArgs eventArgs) {\n if (auth.CurrentUser != user) {\n bool signedIn = user != auth.CurrentUser && auth.CurrentUser != null;\n user = auth.CurrentUser;\n if (signedIn) {\n // Get the user's email address\n string email = user.Email;\n // or get their phone number\n string phoneNumber = user.PhoneNumber;\n // ...\n }\n }\n}\n\n// Handle removing subscription and reference to the Auth instance.\n// Automatically called by a Monobehaviour after Destroy is called on it.\nvoid OnDestroy() {\n auth.StateChanged -= AuthStateChanged;\n auth = null;\n}\n```\n| **Note:** Find more code examples demonstrating Firebase Authentication in the [Firebase quickstarts](https://github.com/firebase/quickstart-ios).\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[arrow_back_ios**Introduction**](/docs/tutorials/ads-ios-on-device-measurement/index-first-party)\n[**Step 2** : Integrate Google Analyticsarrow_forward_ios](/docs/tutorials/ads-ios-on-device-measurement/step-2)\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]