사용자 목록에 광고 ID 업로드

Bulk Upload API를 사용하여 Authorized Buyers에 광고 ID를 추가하고 삭제할 수 있습니다. 사용자 목록을 활용하세요.

다음은 HTTPS Bulk 업로더 API URL의 예입니다.

https://cm.g.doubleclick.net/upload?nid={GoogleNetworkId}

엔드포인트는 HTTPS POST 요청을 수락합니다.

GoogleNetworkId 값은 쿠키 매칭 네트워크 ID (NID)여야 합니다. 이 URL은 일괄 업로더의 계정을 고유하게 식별하고 쿠키 매칭.

HTTPS POST 요청의 페이로드는 프로토콜 버퍼입니다. 일괄 업로더 서비스의 스키마는 다음 페이지를 참고하세요. cookie-bulk-upload-proto.txt. 각 포드의 페이로드는 요청은 100KB로 제한됩니다.

cookie-bulk-upload.proto를 컴파일하고 사용하여 메일을 직렬화하고 파싱하는 방법은 언어를 선택합니다.

다음과 같은 식별자 유형을 업로드할 수 있습니다.

  • Google 사용자 ID
  • 파트너 제공 ID
  • iOS IDFA
  • Android 광고 ID
  • Roku ID
  • Amazon Fire TV ID
  • Xbox 또는 Microsoft ID

Google 사용자 ID 업로드

Google 사용자 ID는 doubleclick.net 도메인의 암호화된 ID입니다.

Google 사용자 ID를 업로드하는 방법은 다음과 같습니다.

  1. Google로 쿠키 매칭을 설정하고 데이터 이동 색인
  2. 데이터 이동 색인을 사용하여 사용자 ID를 Google 사용자 ID로 변환합니다.
  3. Google 사용자 ID를 사용자 목록에 업로드합니다.

쿠키 매칭 중에 다음과 같은 메시지를 수신하는 경우를 예로 들 수 있습니다.

https://ad.network.com/pixel?google_gid=CAESEHIV8HXNp0pFdHgi2rElMfk&google_cver=1

google_gid 매개변수는 암호화된 Google 사용자 ID입니다.

사용자 목록에 추가하려면 UpdateUsersDataRequest 본문에 복사합니다.

ops {
  user_id: "CAESEHIV8HXNp0pFdHgi2rElMfk"
  user_list_id: 111
  delete: false
  user_id_type: GOOGLE_USER_ID
}

파트너 제공 ID 업로드

파트너가 제공한 ID는 파트너 자체 도메인에 속한 ID입니다. 다음 단계를 따르세요. 파트너가 제공한 ID를 업로드하는 방법은 다음과 같습니다.

  1. Google로 쿠키 매칭을 설정하고 데이터 이동 색인을 호스팅합니다.

  2. 파트너가 제공한 ID를 사용자 목록에 업로드합니다.

    예를 들어 도메인의 사용자 ID가 123456로 설정된 경우 다음을 수행할 수 있습니다. 쿠키 일치로 Google에서 호스팅하는 데이터 이동 색인에 이를 채웁니다. 관심장소 태그에 웹에 적합한 base64 인코딩 버전 다음과 같이 google_hm 매개변수에 할당된 ID:

    https://cm.g.doubleclick.net/pixel?google_nid=cookie-monster&google_hm=MTIzNDU2&google_cm
    
  3. 그런 다음 파트너가 제공한 ID를 UpdateUsersDataRequest:

    ops {
     user_id: "123456"
     user_list_id: 123
     delete: false
     user_id_type: PARTNER_PROVIDED_ID
    }
    
  4. 그러면 Google은 파트너가 제공한 ID에서 Google로 사용자 목록을 번역합니다. 사용자 ID를 만들고 사용자 목록에 ID를 추가합니다.

IDFA 또는 Android 광고 ID 업로드

기기 ID를 업로드할 수도 있습니다.

  1. UpdateUsersDataRequest(으)로 기기 ID 업로드:

    ops {
     user_id: "2024D65F-EBBD-11FF-23AB-823FC255913A"
     user_list_id: 111
     delete: false
     user_id_type: IDFA
    }
    
  2. 그런 다음 Google은 사용자 목록을 기기 ID에서 Google 사용자 ID로 변환합니다. 사용자 목록에 ID를 추가합니다.

를 통해 개인정보처리방침을 정의할 수 있습니다.

워크플로

모든 일괄 업로더 요청 및 응답 예는 텍스트로 작성 형식을 선택합니다. 다음 메시지를 보내야 합니다. 이를 직렬화된 프로토콜 버퍼 메시지로 업로더 API 엔드포인트

예를 들어 IDFA 및 파트너 제공 ID를 사용자 목록 123에 업로드하려면 다음 단계를 따르세요. UpdateUsersDataRequest 만들기:

ops {
  user_id: "2024D65F-EBBD-11FF-23AB-823FC255913A"
  user_list_id: 123
  delete: false
  user_id_type: IDFA
}
ops {
  user_id: "1234567"
  user_list_id: 123
  delete: false
  user_id_type: PARTNER_PROVIDED_ID
}
# See warning before use. Requires affirmative end-user consent.
process_consent: true

그런 다음 직렬화된 UpdateUsersDataRequest과 함께 HTTPS POST 요청을 전송합니다. 메시지를 페이로드로 사용합니다.

모든 작업이 성공하면 다음과 같은 결과가 표시됩니다. UpdateUsersDataResponse:

status: NO_ERROR

일부 작업이 성공하면 응답에는 실패한 각 작업에 대한 오류를 포함하는 UpdateUsersDataResponse:

status: PARTIAL_SUCCESS
errors {
  user_id: "1234567"
  error_code: UNKNOWN_ID
  user_id_type: PARTNER_PROVIDED_ID
}

성공한 작업이 없을 경우 응답에는 statusBAD_COOKIE로 설정된 UpdateUsersDataResponse:

status: BAD_COOKIE

다음은 라이브러리 사용 방법을 보여주는 Python 스크립트 예입니다. cookie-bulk-upload.proto로 생성되어 특정 ID로 사용자 목록을 가져올 수 있습니다.

  #!/usr/bin/python
#
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""A sample demonstrating usage of the Authorized Buyers Bulk Upload service.

Successfully running this example will add the provided ID to the given user
list. To learn more about the bulk uploader service, see:
https://developers.google.com/authorized-buyers/rtb/bulk-uploader
"""


import argparse

import gen.cookie_bulk_upload_pb2

import requests


BULK_UPLOAD_ENDPOINT_TEMPLATE = 'https://cm.g.doubleclick.net/upload?nid=%s'


def main(account_nid, user_list_id, user_id, user_id_type):
    # Build the bulk upload request.
    update_request = gen.cookie_bulk_upload_pb2.UpdateUsersDataRequest()
    update_request.send_notifications = True

    ops = update_request.ops
    op = ops.add()
    op.user_list_id = user_list_id
    op.user_id = user_id
    op.user_id_type = user_id_type

    user_id_type_value = gen.cookie_bulk_upload_pb2.UserIdType.Name(
        user_id_type)

    print(f'For NID "{account_nid}", adding user ID "{user_id}" of type '
          f'"{user_id_type_value}" to user list ID "{user_list_id}"')

    # Execute the bulk upload request.
    response = requests.post(BULK_UPLOAD_ENDPOINT_TEMPLATE % account_nid,
                             data=update_request.SerializeToString())

    # Parse and display the response.
    update_response = gen.cookie_bulk_upload_pb2.UpdateUsersDataResponse()
    update_response.ParseFromString(response.content)

    print('Operation completed with the following:')
    print(f'\tHTTP Status code: {response.status_code}')
    status_value = gen.cookie_bulk_upload_pb2.ErrorCode.Name(
        update_response.status)
    print(f'\tUpdateUsersDataResponse.status: {status_value}')
    print(f'\tUpdateUsersDataResponse.errors: {update_response.errors}')
    print('\tUpdateUsersDataResponse.notifications: '
          f'{update_response.notifications}')
    n_status_value = gen.cookie_bulk_upload_pb2.NotificationStatus.Name(
        update_response.notification_status)
    print(f'\tUpdateUsersDataResponse.notification_status: {n_status_value}')


if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description=('A sample demonstrating usage of the Authorized Buyers '
                     'bulk uploader service.'))
    parser.add_argument('-n', '--account_nid',
                        required=True, help='The Account NID.')
    parser.add_argument('-u', '--user_id',
                        required=True, help='The User ID to be added.')
    parser.add_argument('-l', '--user_list_id', type=int, required=True,
                        help='The user list that the ID is being added to.')
    parser.add_argument('-t', '--user_id_type', type=int, required=True,
                        help=('The type of user ID being added. See '
                              '"UserIdType" enum for more details.'))
    args = parser.parse_args()

    main(args.account_nid, args.user_list_id, args.user_id, args.user_id_type)


Bulk Upload API를 사용하는 파트너는 Google과 사용자 데이터를 공유할 수 있는 법적 근거를 process_consent 매개변수를 입력합니다. 이 요구사항은 모든 일괄 업로드에 적용됩니다. 요청을 처리합니다

Google EU의 요구사항에 따라 최종 사용자 동의가 필요한 사용자 데이터의 경우 사용자 동의 정책 (https://www.google.com/about/company/user-consent-policy/ 참조) 또는 기타 현지 법규에 따라 파트너는 최종 사용자 동의 및 수집된 동의를 표시합니다. process_consent=True를 설정하여

최종 사용자 동의 요건이 적용되지 않는 사용자 데이터의 경우 파트너는 동의가 process_consent=True를 설정하여 필요합니다.

process_consent가 누락된 요청은 필터링되어 반환됩니다. 다음 오류가 반환됩니다.

status: MISSING_CONSENT_WILL_BE_DROPPED

process_consentfalse로 설정된 요청은 필터링되고 다음 오류가 반환됩니다.

status: MISSING_CONSENT