دمج Google Play Install Referrer Library في تطبيقك
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكنك اتخاذ قرارات تسويقية مدروسة من خلال تحديد قنوات اكتساب المستخدمين الأكثر أهمية للعبة. استخدِم Google Play Install Referrer API للحصول على
طريقة موثوقة لتتبُّع معلومات الإحالة لتطبيقاتك.
من خلال تتبُّع بيانات الإحالات، يمكنك معرفة مصادر الزيارات التي تُرسل
أكبر عدد من المستخدمين لتنزيل تطبيقك من متجر Google Play. يمكن أن تساعدك هذه الإحصاءات في الاستفادة إلى أقصى حد من إنفاقك الإعلاني وزيادة عائد الاستثمار إلى أقصى حد.
الخطوة 2: طلب تفاصيل المُحيل عند بدء تشغيل التطبيق
بعد أن يُكمل المستخدم عملية تثبيت اللعبة ويشغّلها، يمكن لتطبيقك تحديد مصدر الزيارات التي أدّت إلى عملية التثبيت باستخدام واجهات برمجة التطبيقات Install
Referrer APIs.
ابحث عن تفاصيل المُحيل باستخدام
InstallReferrerClient::GetInstallReferrer. في الردّ، يمكن استرداد السلسلة نفسها التي تم تمريرها إلى مَعلمة طلب البحث referrer في صفحة
بطاقة بياناتك على المتجر. ويمكن بعد ذلك إرفاق تفاصيل المُحيل بالبيانات التحليلية التي تم جمعها، مثل حدث تثبيت التطبيق.
autopromise=std::make_shared<std::promise<GetInstallReferrerResult>>();install_referrer_client.GetInstallReferrer(params,[promise](GetInstallReferrerResultresult){promise->set_value(std::move(result));});autoget_install_referrer_result=promise->get_future().get();if(get_install_referrer_result.ok()){autoinstall_referrer=get_install_referrer_result.value().install_referrer;// Attribute your game's installation to an acquisition channel by including// the install referrer. Typically this would be done by logging an app// install event with an analytics library of your choice that includes the// `install_referrer`.}
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Integrate the Google Play Install Referrer Library into your app\n\nMake informed marketing decisions by identifying your most valuable user\nacquisition channels for your game. Use the Google Play Install Referrer API for\na reliable way to track your apps' referral information.\n\nBy tracking referral data, you can understand which traffic sources send the\nmost users to download your app from the Google Play store. These insights can\nhelp you make the most of your advertising spend and maximize ROI.\n\nPrerequisites\n-------------\n\n- Complete the [SDK setup](/games/playgames/native-pc/setup).\n\n**Step 1**: Link to your store listing page\n-------------------------------------------\n\nStart by linking your users to your application's Google Play store page. In the\nURL include query params for:\n\n- `id`: The Play package name of your game\n- `referrer`: A string representing the referral source. This can be queried once your application is installed and running.\n\n https://play.google.com/store/apps/details?id=\u003cvar translate=\"no\"\u003ecom.example.package\u003c/var\u003e&referrer=\u003cvar translate=\"no\"\u003eexample_referrer_source\u003c/var\u003e\n\n**Step 2**: Query the referrer details on app startup\n-----------------------------------------------------\n\n| **Note:** The referrer will be available for 90 days after the installation of your game.\n\nOnce the user has completed the installation of game and launched it your app\ncan determine the traffic source that led to the installation using the Install\nReferrer APIs.\n\nQuery the referrer details using\n[`InstallReferrerClient::GetInstallReferrer`](/games/playgames/native-pc/reference/class/google/play/install-referrer/install-referrer-client#getinstallreferrer). In the\nresponse the same string passed into the `referrer` query param of your store\nlisting page can be retrieved. The referrer details can then be attached\nanalytics collected such as an app installed event. \n\n auto promise = std::make_shared\u003cstd::promise\u003cGetInstallReferrerResult\u003e\u003e();\n install_referrer_client.GetInstallReferrer(params, [promise](GetInstallReferrerResult result) {\n promise-\u003eset_value(std::move(result));\n });\n\n auto get_install_referrer_result = promise-\u003eget_future().get();\n if (get_install_referrer_result.ok()) {\n auto install_referrer = get_install_referrer_result.value().install_referrer;\n // Attribute your game's installation to an acquisition channel by including\n // the install referrer. Typically this would be done by logging an app\n // install event with an analytics library of your choice that includes the\n // `install_referrer`.\n }"]]