দর্শনযোগ্যতা এবং অবৈধ ট্রাফিক মেট্রিক্স জিজ্ঞাসা করুন

সংক্ষিপ্ত বিবরণ

নিচের নির্দেশাবলীতে এপিআই (API) ব্যবহার করে কীভাবে বৈধ এবং অবৈধ উভয় প্রকার ভিউএবিলিটি ট্র্যাফিক কোয়েরি করতে হয়, তার উদাহরণ দেওয়া হয়েছে। এই মেট্রিকগুলো শুধুমাত্র গুগল অ্যাডস (Google Ads), ডিসপ্লে অ্যান্ড ভিডিও ৩৬০ (Display & Video 360), এবং ইউটিউব রিজার্ভ (YouTube reserve) ব্যবহার করে কেনা ইনভেন্টরির জন্য সীমাবদ্ধ।

উল্লেখ্য যে, MRC-স্বীকৃত TrueView ভিউ মেট্রিক্সের জন্য ADH API ব্যবহার করা আবশ্যক, কারণ এর সাথে কোনো টেমপ্লেটেড কোয়েরি যুক্ত নেই। এছাড়াও, TrueView ভিউ মেট্রিক্সকে ভিউএবিলিটি মেট্রিক্সের সাথে গুলিয়ে ফেলা উচিত নয়।

যে বায়িং ডোরটির ভিউএবিলিটি মেট্রিক্স সম্পর্কে জানতে চান, সেটি নির্বাচন করুন:

UI ব্যবহার করে দর্শনযোগ্যতার মেট্রিকগুলো অনুসন্ধান করুন

টেমপ্লেটেড ভিউএবিলিটি কোয়েরিটি এমআরসি-স্বীকৃত মেট্রিক্স প্রদান করে।

MRC স্বীকৃতি দ্বিমুখী—আপনার ফলাফল স্বীকৃত হতে পারে, অথবা নাও হতে পারে—এবং এটি আপনার সম্পূর্ণ ফলাফল টেবিলের উপর প্রযোজ্য। BigQuery-তে, adh-mrc-accredited লেবেলটি সমস্ত MRC-স্বীকৃত ফলাফলের উপর প্রয়োগ করা হয়। আপনার মেট্রিকগুলোকে MRC-স্বীকৃত করার জন্য আপনাকে অবশ্যই টেমপ্লেটের মাধ্যমে কোয়েরিটি চালাতে হবে।

টেমপ্লেটের মাধ্যমে এমআরসি-স্বীকৃত কোয়েরিটি চালাতে:

  1. কোয়েরি তৈরি করার নির্দেশাবলী অনুসরণ করুন এবং নিশ্চিত করুন যে আপনি নির্বাচন করেছেনGoogle Ads ক্রয়ের প্রবেশদ্বার হিসেবে এবং কোয়েরি টেমপ্লেট হিসেবে ভিডিও ভিউএবিলিটি
  2. Use template-এর পাশে থাকা Run বাটনটিতে ক্লিক করুন।

এপিআই ব্যবহার করে অবৈধ ট্র্যাফিক এবং ভিউএবিলিটি মেট্রিক্স অনুসন্ধান করুন

generateIvtReport ব্যবহার করে ADH API থেকে অবৈধ ট্র্যাফিক এবং ভিউএবিলিটি মেট্রিক্স পুনরুদ্ধার করা যেতে পারে। এবং startAnalysis এন্ডপয়েন্টগুলো। অবৈধ ট্র্যাফিকের ক্ষেত্রে, আপনার মেট্রিকগুলো generateIvtReport মাধ্যমে সংগ্রহ করতে হবে। adh-mrc-accredited লেবেলটি প্রয়োগ করার জন্য এবং আপনার মেট্রিকগুলিকে MRC-স্বীকৃত করার জন্য। একইভাবে, MRC স্বীকৃতির জন্য ADH API-এর মাধ্যমে ভিউএবিলিটি মেট্রিকের জন্য নীচে উল্লেখিত গ্লোবাল কোয়েরিটি অবশ্যই ব্যবহার করতে হবে। এই বিভাগে পাইথন ক্লায়েন্ট লাইব্রেরি ব্যবহার করে এই এন্ডপয়েন্টে কীভাবে একটি অনুরোধ পাঠাতে হয় তা আলোচনা করা হয়েছে।

এপিআই কুইকস্টার্ট- এ দেওয়া সেটআপ এবং অনুমোদন/প্রমাণীকরণ নির্দেশাবলী অনুসরণ করুন।

নিম্নলিখিত ফিল্ডগুলি আপনার অ্যাকাউন্টের সাথে প্রাসঙ্গিক তথ্য দিয়ে প্রতিস্থাপন করার পর, আপনি আপনার জন্য একটি অবৈধ ট্র্যাফিক রিপোর্ট পুনরুদ্ধার করতে নীচের কোয়েরিটি চালাতে পারেন। Google Ads প্রচারণা:

  • ক্লায়েন্টের গোপনীয় ফাইল
  • গ্রাহক আইডি
  • এপিআই কী
  • Campaign IDs
  • সময় অঞ্চল

নমুনা কোড

অবৈধ ট্র্যাফিক

from __future__ import print_function
import json
import os.path
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build

# If modifying these scopes, delete the file `token.json`.
SCOPES = ['https://www.googleapis.com/auth/adsdatahub']
TOKEN_FILE = 'token.json'

creds = None

# The file token.json stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists(TOKEN_FILE):
    creds = Credentials.from_authorized_user_file(TOKEN_FILE, SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
    if creds and creds.expired and creds.refresh_token:
        creds.refresh(Request())
    else:
        flow = InstalledAppFlow.from_client_secrets_file(
            'YOUR_CLIENT_SECRETS.json', SCOPES)
        creds = flow.run_local_server(port=0)
    # Save the credentials for the next run.
    with open(TOKEN_FILE, 'w') as token:
        token.write(creds.to_json())

service = build('adsdatahub', 'v1', credentials=creds,
                developerKey='YOUR_API_KEY',
                discoveryServiceUrl='https://adsdatahub.googleapis.com/$discovery/rest?version=v1&labels=')

body = {
    'ads_data_customer_id': YOUR_CUSTOMER_ID,
    'start_date': {
        'year': 2019,
        'month': 12,
        'day': 15
    },
    'end_date': {
        'year': 2019,
        'month': 12,
        'day': 20
    },
    'time_zone': 'YOUR_TIMEZONE',
    'google_ads_dimensions': {
        'campaign_ids': [YOUR_CAMPAIGN_IDS],
        'metric_type': 'METRIC_TYPE_IMPRESSION'
    },
    'dest_table': 'YOUR_DESTINATION_TABLE'
}

resp = service.customers().generateIvtReport(name='customers/YOUR_CUSTOMER_ID,
                                             body=body).execute()
print(json.dumps(resp))

দর্শনযোগ্যতা মেট্রিক্স

from __future__ import print_function
import json
import os.path
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build

# If modifying these scopes, delete the file `token.json`.
SCOPES = ['https://www.googleapis.com/auth/adsdatahub']
TOKEN_FILE = 'token.json'

creds = None

# The file token.json stores the user's access and refresh tokens, and is
# created automatically when the authorization flow completes for the first
# time.
if os.path.exists(TOKEN_FILE):
    creds = Credentials.from_authorized_user_file(TOKEN_FILE, SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
    if creds and creds.expired and creds.refresh_token:
        creds.refresh(Request())
    else:
        flow = InstalledAppFlow.from_client_secrets_file(
            'YOUR_CLIENT_SECRETS.json', SCOPES)
        creds = flow.run_local_server(port=0)
    # Save the credentials for the next run.
    with open(TOKEN_FILE, 'w') as token:
        token.write(creds.to_json())

service = build('adsdatahub', 'v1', credentials=creds,
                developerKey='YOUR_API_KEY',
                discoveryServiceUrl='https://adsdatahub.googleapis.com/$discovery/rest?version=v1&labels=')

name = 'customers/global/analysisQueries/f41320e7296d49158e572aba662f35b1'
body = {
  'spec': {
    'ads_data_customer_id': YOUR_CUSTOMER_ID,
    'start_date': {
      'year': 2019,
      'month': 12,
      'day': 15
    },
    'end_date': {
      'year': 2019,
      'month': 12,
      'day': 20
    },
    'time_zone': 'YOUR_TIMEZONE',
    'parameter_values': {
      'campaign_ids': {
        'array_value': {
          'values': [
            {
              'value': 'YOUR_CAMPAIGN_ID'
            },
          ]
        }
      }
    }
  },
  'dest_table': 'YOUR_DESTINATION_TABLE',
  'customer_id': YOUR_CUSTOMER_ID
}

resp = service.customers().analysisQueries().start(name=name,body=body).execute()
print(json.dumps(resp))

সাধারণ অবৈধ ট্র্যাফিক বাদ দিয়ে দর্শনযোগ্যতার মেট্রিক গণনা করুন।

সাধারণ অবৈধ ট্র্যাফিক (GIVT) বাদ দিয়ে MRC-স্বীকৃত দর্শনযোগ্যতার মেট্রিকগুলো নির্ণয় করতে নিম্নলিখিত সূত্রগুলো ব্যবহার করুন:

  • মোট ইম্প্রেশন (GIVT বাদে): মোট ইম্প্রেশন - সাধারণ অবৈধ ইম্প্রেশন
  • দর্শনযোগ্য ইম্প্রেশন (GIVT বাদ দিয়ে): দর্শনযোগ্য ইম্প্রেশন + অবৈধ দর্শনযোগ্য ইম্প্রেশন - GIVT দর্শনযোগ্য ইম্প্রেশন
  • পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদ দিয়ে): পরিমাপযোগ্য ইম্প্রেশন + অবৈধ পরিমাপযোগ্য ইম্প্রেশন - GIVT পরিমাপযোগ্য ইম্প্রেশন
  • যোগ্য ইম্প্রেশন (GIVT বাদ দিয়ে): যোগ্য ইম্প্রেশন + অবৈধ যোগ্য ইম্প্রেশন - GIVT যোগ্য ইম্প্রেশন
  • অদর্শনযোগ্য ইম্প্রেশন (GIVT বাদে) : পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে) - দর্শনযোগ্য ইম্প্রেশন (GIVT বাদে)
  • অপরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে): যোগ্য ইম্প্রেশন (GIVT বাদে) - পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে)
  • % পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে): পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে) / যোগ্য ইম্প্রেশন (GIVT বাদে)
  • % দর্শনযোগ্য ইম্প্রেশন (GIVT বাদে): দর্শনযোগ্য ইম্প্রেশন (GIVT বাদে) / পরিমাপযোগ্য ইম্প্রেশন (GIVT বাদে)