নেটওয়ার্ক ট্রেসিং
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
প্ল্যাটফর্ম নির্বাচন করুন: Android iOS নেটওয়ার্ক ট্রেসিং আপনাকে Google মোবাইল বিজ্ঞাপন SDK-এর সাথে সম্পর্কিত নেটওয়ার্ক কার্যকলাপগুলি দেখতে দেয়৷ এটি আপনার Google মোবাইল বিজ্ঞাপন বাস্তবায়ন ডিবাগ করতে কার্যকর হতে পারে।
চার্লস প্রক্সির মতো সরঞ্জামগুলির পরিবর্তে নেটওয়ার্ক ট্রেসিং ব্যবহার করার একটি মূল কারণ হল এটি অ্যান্ড্রয়েডের সমস্ত সংস্করণ এবং Google প্লে পরিষেবাগুলির সমর্থিত সংস্করণ চালানো ডিভাইসগুলির সাথে কাজ করে৷ অ্যান্ড্রয়েড 7.0 থেকে বিশ্বস্ত CA এবং সার্টিফিকেটের পরিবর্তনের কারণে প্রক্সিিং টুলের ক্ষেত্রে এটি হয় না।
এই নির্দেশিকা ব্যাখ্যা করে কিভাবে ডিবাগিং উদ্দেশ্যে নেটওয়ার্ক ট্রেসিং সক্ষম করতে হয়।
ট্রেসিং সক্ষম করুন
নেটওয়ার্ক ট্রেসিং সক্ষম করতে, আপনার ডিভাইসের জন্য বিকাশকারী বিকল্পগুলি সক্ষম করুন ৷ তারপরে, Google সেটিংস অ্যাপ চালু করুন এবং বিজ্ঞাপন বিকল্পটি নির্বাচন করুন:

ধরে নিচ্ছি যে আপনি বিকাশকারী বিকল্পগুলি সক্ষম করেছেন এবং বৈশিষ্ট্যটি উপলব্ধ রয়েছে, আপনার স্ক্রীনটি এর মতো দেখাবে:

নিম্নলিখিত ডায়ালগগুলি আনতে বিজ্ঞাপনগুলির জন্য ডিবাগ লগিং সক্ষম করুন বিকল্পটি নির্বাচন করুন:

ঠিক আছে আলতো চাপুন এবং তারপরে আপনাকে একটি বিজ্ঞাপন শনাক্তকারী উপস্থাপন করা হবে যা 10ca1ad1abe1
দিয়ে শেষ হয় :

আপনি এখন logcat এ নেটওয়ার্ক লগিং থেকে সমস্ত আউটপুট দেখতে সক্ষম। স্ক্রীন এবং ফাইল উভয়ের জন্য শুধুমাত্র তথ্য-স্তরের বিজ্ঞাপন আউটপুট ফিল্টার করতে, নিম্নলিখিত কমান্ডটি জারি করুন:
adb logcat '*:S' Ads:I Ads-cont:I | tee logs.txt
আউটপুট
স্ট্যান্ডার্ড প্ল্যাটফর্ম-উপযুক্ত কনসোল লগগুলি নেটওয়ার্ক লগগুলি আউটপুট করতে ব্যবহৃত হয়।
কনসোল লগ বার্তাগুলি সর্বদা GMA Debug BEGIN
, GMA Debug CONTENT
, বা GMA Debug FINISH
স্ট্রিং দিয়ে শুরু হয়, যাতে আপনি এই স্ট্রিংগুলিতে অনুসন্ধান বা ফিল্টার করতে পারেন৷ প্রতিটি নেটওয়ার্ক লগের জন্য, প্রথম লগ বার্তাটি হল GMA Debug BEGIN
, শেষ লগ বার্তাটি হল GMA Debug FINISH
, এবং নেটওয়ার্ক লগ সামগ্রীটি GMA Debug CONTENT
দিয়ে শুরু হয়৷ বিষয়বস্তু একটি লাইনে ফিট করার জন্য খুব দীর্ঘ হলে, এটি একাধিক লাইনে বিভক্ত হয়, প্রতিটি লাইন GMA Debug CONTENT
দিয়ে শুরু হয়।
কনসোল আউটপুট উদাহরণ
I/Ads ( 4660): GMA Debug BEGIN
I/Ads ( 4660): GMA Debug CONTENT {"timestamp":1510679993741,...}
I/Ads ( 4660): GMA Debug FINISH
JSON আউটপুট উদাহরণ
এখানে logcat থেকে JSON আউটপুটের কিছু নমুনা রয়েছে:
onNetworkRequest
{
"timestamp": 1510679994904,
"event": "onNetworkRequest",
"components": [
"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2",
"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90"
],
"params": {
"firstline": {
"uri": "http://googleads.g.doubleclick.net/pagead/ads?carrier=....",
"verb": "GET"
},
"headers": [
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Linux; Android 5.0.2;..."
}
]
}
}
onNetwork রেসপন্স
{
"timestamp": 1510679995295,
"event": "onNetworkResponse",
"components": [
"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2",
"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90"
],
"params": {
"firstline": {
"code": 200
},
"headers": [
{
"name": null,
"value": "HTTP/1.1 200 OK"
},
{
"name": "X-Google-DOS-Service-Trace",
"value": "main:pagead"
},
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
},
...
]
}
}
onNetwork ResponseBody
{
"timestamp": 1510679995375,
"event": "onNetworkResponseBody",
"components": [
"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2",
"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90"
],
"params": {
"bodydigest": "B2520049D02F3C70A12AD1BC0D1B58A4",
"bodylength": 122395
}
}
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-03 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","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-03 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eNetwork tracing provides insights into network activities related to the Google Mobile Ads SDK, aiding in debugging your implementation.\u003c/p\u003e\n"],["\u003cp\u003eIt's compatible with all Android versions and devices running supported Google Play services, unlike some proxy tools.\u003c/p\u003e\n"],["\u003cp\u003eEnable tracing through developer options in the Google Settings app, selecting "Ads" and then "Enable debug logging for ads".\u003c/p\u003e\n"],["\u003cp\u003eNetwork logs, viewable in logcat, are identified by "GMA Debug BEGIN," "GMA Debug CONTENT," and "GMA Debug FINISH" markers and provide detailed request and response information in JSON format.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON output includes timestamps, event types (like onNetworkRequest, onNetworkResponse, onNetworkResponseBody), and relevant parameters such as URLs, headers, response codes, and body details.\u003c/p\u003e\n"]]],["Network tracing for the Google Mobile Ads SDK enables debugging by viewing network activities, which works across all Android versions unlike proxying tools. To enable it, activate developer options on your device, then in the Google Settings app, select the \"Ads\" option and \"Enable debug logging for ads.\" Network logs are outputted to the console, starting with \"GMA Debug BEGIN,\" followed by \"GMA Debug CONTENT\" for the content, and ending with \"GMA Debug FINISH\", which are filterable. JSON output examples include `onNetworkRequest`, `onNetworkResponse`, and `onNetworkResponseBody`.\n"],null,["Select platform: [Android](/admob/android/network-tracing \"View this page for the Android platform docs.\") [iOS](/admob/ios/network-tracing \"View this page for the iOS platform docs.\")\n\n\u003cbr /\u003e\n\nNetwork tracing lets you see network activities relating to the Google Mobile\nAds SDK. This can be useful in debugging your Google Mobile Ads implementation.\n\nA key reason to use network tracing instead of tools such as [Charles\nProxy](//www.charlesproxy.com) is that it works with **all** versions of\nAndroid and devices running a supported version of Google play services. This\nisn't the case with proxying tools due to changes in\n[trusted CAs and certificates in place since Android 7.0](//developer.android.com/about/versions/nougat/android-7.0#default_trusted_ca).\n\nThis guide explains how to enable network tracing for debugging purposes.\n\nEnable tracing\n\nTo enable network tracing, [enable developer\noptions](//developer.android.com/studio/debug/dev-options) for your device.\nThen, launch the **Google Settings** app and select the **Ads** option:\n\nAssuming you have developer options enabled and the feature is available, your\nscreen would then look like this:\n\nSelect the **Enable debug logging for ads** option to bring up following dialog:\n\nTap **OK** and you're then presented with an advertising identifier that ends\nwith `10ca1ad1abe1`:\n\nYou are now able to see all the output from the network logging in logcat. To\nfilter only Information-level Ads output to both the screen and a file, issue\nthe following command: \n\n adb logcat '*:S' Ads:I Ads-cont:I | tee logs.txt\n\nOutput\n\nStandard platform-appropriate console logs are used to output the network logs.\n\nConsole log messages always begin with the string `GMA Debug BEGIN`,\n`GMA Debug CONTENT`, or `GMA Debug FINISH`, so you can search or filter on these\nstrings. For each network log, the first log message is `GMA Debug BEGIN`,\nthe last log message is `GMA Debug FINISH`, and the network log content begins\nwith `GMA Debug CONTENT`. If content is too long to fit on a line, it is split\namong multiple lines, each line beginning with `GMA Debug CONTENT`.\n\nConsole output example \n\n I/Ads ( 4660): GMA Debug BEGIN\n I/Ads ( 4660): GMA Debug CONTENT {\"timestamp\":1510679993741,...}\n I/Ads ( 4660): GMA Debug FINISH\n\nJSON output example\n\nHere are some samples of JSON output from logcat:\n\nonNetworkRequest \n\n {\n \"timestamp\": 1510679994904,\n \"event\": \"onNetworkRequest\",\n \"components\": [\n \"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2\",\n \"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90\"\n ],\n \"params\": {\n \"firstline\": {\n \"uri\": \"http://googleads.g.doubleclick.net/pagead/ads?carrier=....\",\n \"verb\": \"GET\"\n },\n \"headers\": [\n {\n \"name\": \"User-Agent\",\n \"value\": \"Mozilla/5.0 (Linux; Android 5.0.2;...\"\n }\n ]\n }\n }\n\nonNetworkResponse \n\n {\n \"timestamp\": 1510679995295,\n \"event\": \"onNetworkResponse\",\n \"components\": [\n \"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2\",\n \"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90\"\n ],\n \"params\": {\n \"firstline\": {\n \"code\": 200\n },\n \"headers\": [\n {\n \"name\": null,\n \"value\": \"HTTP/1.1 200 OK\"\n },\n {\n \"name\": \"X-Google-DOS-Service-Trace\",\n \"value\": \"main:pagead\"\n },\n {\n \"name\": \"Content-Type\",\n \"value\": \"text/html; charset=UTF-8\"\n },\n ...\n ]\n }\n }\n\nonNetworkResponseBody \n\n {\n \"timestamp\": 1510679995375,\n \"event\": \"onNetworkResponseBody\",\n \"components\": [\n \"ad_request_cf5ab185-3c3f-4f01-9f56-33da2ae110f2\",\n \"network_request_6553bc32-1d44-4f18-9dd0-5c183abbeb90\"\n ],\n \"params\": {\n \"bodydigest\": \"B2520049D02F3C70A12AD1BC0D1B58A4\",\n \"bodylength\": 122395\n }\n }"]]