고객 일치 타겟팅 잠재고객 업로드

Display & Video 360 API를 통해 업로드된 고객 연락처 정보 또는 휴대기기 ID를 사용하여 고객 일치 타겟팅 잠재고객을 만들 수 있습니다. 이 페이지에서는 Display & Video 360 API를 사용하여 초기 고객 일치 타겟팅 잠재고객을 만들고 기존 잠재고객에 신규 고객 데이터를 추가하는 방법을 설명합니다.

사용자 데이터 준비

고객 일치 타겟팅 잠재고객을 채우는 데 사용되는 사용자 데이터는 민감한 정보이므로 업로드하기 전에 적절하게 준비해야 합니다.

민감한 정보 해싱

일부 고객 일치 타겟팅 잠재고객은 민감한 고객 연락처 정보를 사용하여 생성됩니다. Display & Video 360에서는 민감한 정보를 업로드하기 전에 SHA256 알고리즘을 사용하여 해싱해야 합니다. 다음 데이터 필드는 업로드하기 전에 해싱해야 합니다.

  • 이름
  • 이메일 주소
  • 전화번호

우편번호 및 국가 코드는 업로드하기 전에 해싱해서는 안 됩니다. 해싱되지 않은 고객 데이터를 업로드하려고 하면 오류가 발생합니다.

데이터를 해싱하기 전에 다음 조건을 충족하는지 확인하세요.

  • 이름, 성, 이메일 주소 값에서 공백을 삭제해야 합니다.
  • 모든 값은 소문자여야 합니다.
  • 모든 전화번호는 E.164 형식을 사용하여 형식을 지정해야 하며 국가 통화 코드를 포함해야 합니다.

사용자 데이터를 업로드할 때 제공된 ContactInfoList 또는 MobileDeviceIdList 객체의 consent 필드를 사용하여 포함된 사용자가 부여한 동의 신호를 전달합니다.

Consent 객체의 필드 중 하나를 CONSENT_STATUS_DENIED로 설정하면 오류가 발생합니다.

단일 firstAndThirdPartyAudiences.create 또는 firstAndThirdPartyAudiences.editCustomerMatchMembers 요청에 추가된 모든 사용자에 대해 동의 신호가 설정됩니다. 동의 신호가 다른 사용자는 별도의 요청으로 업로드해야 합니다.

고객 일치 타겟팅 잠재고객 만들기

고객 일치 타겟팅 잠재고객은 firstAndThirdPartyAudiences.create 메서드를 사용하여 만들 수 있습니다. 잠재고객은 퍼스트 파티 잠재고객으로 선언되어야 하며 CUSTOMER_MATCH_CONTACT_INFO 또는 CUSTOMER_MATCH_DEVICE_IDaudienceType가 있어야 합니다. 통합 필드 members 내의 적절한 필드를 사용하여 고객 일치 타겟팅 데이터를 제공해야 합니다.

다음은 제공된 해싱된 전화번호 목록을 사용하여 포함 기간이 무제한인 새 연락처 정보 고객 일치 타겟팅 잠재고객을 만드는 방법의 예입니다.

Java

// Create Customer Match audience object.
FirstAndThirdPartyAudience customerMatchAudience =
    new FirstAndThirdPartyAudience()
        .setDisplayName(display-name)
        .setFirstAndThirdPartyAudienceType(
            "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY"
        )
        .setAudienceType("CUSTOMER_MATCH_CONTACT_INFO")
        .setMembershipDurationDays(10000L);

// Build list of contact information objects.
ContactInfoList contactInfoList = new ContactInfoList();
ArrayList<ContactInfo> contactInfos = new ArrayList<ContactInfo>();
for (String hashedPhoneNumber : list-of-hashed-phone-numbers) {
  ContactInfo contactInfo = new ContactInfo();
  ArrayList<String> phoneNumberList = new ArrayList<String>();
  phoneNumberList.add(hashedPhoneNumber);
  contactInfo.setHashedPhoneNumbers(phoneNumberList);
  contactInfos.add(contactInfo);
}
contactInfoList.setContactInfos(contactInfos);

// Build consent object for passing consent if granted by the end user.
Consent consent =
    new Consent()
        .setAdUserData(ad-user-data-consent)
        .setAdPersonalization(ad-personalization-consent);
ContactInfoList.setConsent(consent);

// Assign contact info list to Customer Match audience.
customerMatchAudience.setContactInfoList(contactInfoList);

// Create Customer Match audience.
FirstAndThirdPartyAudience response =
    service
        .firstAndThirdPartyAudiences()
        .create(customerMatchAudience)
        .setAdvertiserId(advertiser-id)
        .execute();

// Display name of new audience.
System.out.printf(
    "Customer Match audience %s was created.",
    response.getName()
);

Python

# Build list of Contact Info objects
contact_infos = []
for hashed_phone_number in list-of-hashed-phone-numbers:
  contact_infos.append({'hashedPhoneNumbers': [hashed_phone_number]})

# Create a Customer Match first- and third-party audience object.
audience_obj = {
    'displayName': display-name,
    'firstAndThirdPartyAudienceType':
        'FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY',
    'audienceType': 'CUSTOMER_MATCH_CONTACT_INFO',
    'membershipDurationDays': 10000,
    'contactInfoList': {
        'contactInfos': [
            contact_infos
        ],
        'consent': {
            'adUserData': ad-user-data-consent,
            'adPersonalization': ad-personalization-consent
        }
    }
}

# Build and execute request.
audience = service.firstAndThirdPartyAudiences().create(
    advertiserId=advertiser-id,
    body=audience_obj
).execute()

# Display name of new audience.
print('Customer Match audience %s was created.' % audience["name"])

2,399필리핀

// Create a Customer Match first- and third-party audience object.
$audience = new Google_Service_DisplayVideo_FirstAndThirdPartyAudience();
$audience->setDisplayName(display-name);
$audience->setFirstAndThirdPartyAudienceType(
    'FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY'
);
$audience->setAudienceType('CUSTOMER_MATCH_CONTACT_INFO');
$audience->setMembershipDurationDays(10000);

// Build list of contact information objects.
$contactInfoList = new Google_Service_DisplayVideo_ContactInfoList();
$contactInfos = array();
foreach (list-of-hashed-phone-numbers as $hashedPhoneNumber) {
    $contactInfo = new Google_Service_DisplayVideo_ContactInfo();
    $contactInfo->setHashedPhoneNumbers(array($hashedPhoneNumber));
    $contactInfos[] = $contactInfo;
}
$contactInfoList->setContactInfos($contactInfos);

// Build consent object for passing consent if granted by the end user.
$consent = new Google_Service_DisplayVideo_Consent();
$consent->setAdUserData(ad-user-data-consent);
$consent->setAdPersonalization(ad-personalization-consent);
$contactInfoList->setConsent($consent);

// Assign contactInfoList to audience object.
$audience->setContactInfoList($contactInfoList);

// Call the API, creating the audience.
$result = $this->service->firstAndThirdPartyAudiences->create(
    $audience,
    array('advertiserId' => advertiser-id)
);

// Display name of new audience.
printf('Customer Match audience %s was created.', $result['name']);

고객 일치 타겟팅 잠재고객의 멤버십 업데이트

타겟팅할 추가 고객을 파악했거나 고객의 기존 잠재고객 멤버십을 갱신해야 하거나 잠재고객에서 고객을 삭제하려는 경우 firstAndThirdPartyAudiences.editCustomerMatchMembers 메서드를 사용하여 기존 고객 일치 타겟팅 잠재고객의 고객 데이터를 업데이트할 수 있습니다. added_members 통합 필드를 사용하여 목록에 고객을 추가하고 removed_members 통합 필드를 사용하여 목록에서 고객을 삭제할 수 있습니다.

단일 firstAndThirdPartyAudiences.editCustomerMatchMembers 요청은 목록에서 구성원을 추가하거나 삭제할 수만 있습니다. 단일 요청에서 두 작업을 모두 시도하면 INVALID_ARGUMENT 오류가 발생합니다.

다음은 제공된 우편 주소 데이터를 사용하여 단일 고객을 기존 연락처 정보 고객 일치 타겟팅 잠재고객에 구성원으로 추가하는 방법을 보여주는 예입니다.

Java

// Create an edit members request object.
EditCustomerMatchMembersRequest editCustomerMatchMembersRequest =
    new EditCustomerMatchMembersRequest()
        .setAdvertiserId(advertiser-id);

// Build contact information object to add to audience.
ContactInfoList contactInfoList = new ContactInfoList();
ArrayList<ContactInfo> contactInfos = new ArrayList<ContactInfo>();
ContactInfo contactInfo =
    new ContactInfo()
        .setHashedFirstName(hashed-customer-first-name)
        .setHashedLastName(hashed-customer-last-name)
        .setZipCodes(customer-zip-codes-list)
        .setCountryCode(customer-country-code);
contactInfos.add(contactInfo);
contactInfoList.setContactInfos(contactInfos);

// Build consent object for passing consent if granted by the end user.
Consent consent =
    new Consent()
        .setAdUserData(ad-user-data-consent)
        .setAdPersonalization(ad-personalization-consent);
ContactInfoList.setConsent(consent);

// Assign contact info list to request body.
editCustomerMatchMembersRequest.setAddedContactInfoList(contactInfoList);

// Edit Customer Match audience membership.
EditCustomerMatchMembersResponse response =
    service
        .firstAndThirdPartyAudiences()
        .editCustomerMatchMembers(
            audience-id,
            editCustomerMatchMembersRequest
        )
        .execute();

// Display ID of updated audience.
System.out.printf(
    "The membership of Customer Match audience ID %s was edited.",
    response.getFirstAndThirdPartyAudienceId()
);

Python

# Create an edit members request object.
edit_member_request_obj = {
    'advertiserId': advertiser-id,
    'addedContactInfoList': {
        'contactInfos': [
            {
                'hashedFirstName': hashed-customer-first-name,
                'hashedLastName': hashed-customer-last-name,
                'countryCode': customer-country-code,
                'zipCodes': customer-zip-codes-list
            }
        ],
        'consent': {
          'adUserData': ad-user-data-consent,
          'adPersonalization': ad-personalization-consent
        }
    }
}

# Build and execute request.
response = service.firstAndThirdPartyAudiences().editCustomerMatchMembers(
    firstAndThirdPartyAudienceId=audience-id,
    body=edit_member_request_obj
).execute()

# Display ID of updated audience.
print('The membership of the Customer Match audience ID %s was updated.'
      % response["firstAndThirdPartyAudienceId"])

2,399필리핀

// Create an edit members request object.
$editMemberRequest =
    new Google_Service_DisplayVideo_EditCustomerMatchMembersRequest();
$editMemberRequest->setAdvertiserId(advertiser-id);

// Build contact information object to add to audience.
$contactInfoList = new Google_Service_DisplayVideo_ContactInfoList();
$contactInfos = array();
$contactInfo = new Google_Service_DisplayVideo_ContactInfo();
$contactInfo->setHashedFirstName(hashed-customer-first-name);
$contactInfo->setHashedLastName(hashed-customer-last-name);
$contactInfo->setCountryCode(customer-country-code);
$contactInfo->setZipCodes(array(customer-zip-codes-list));
$contactInfos[] = $contactInfo;
$contactInfoList->setContactInfos($contactInfos);

// Build consent object for passing consent if granted by the end user.
$consent = new Google_Service_DisplayVideo_Consent();
$consent->setAdUserData(ad-user-data-consent);
$consent->setAdPersonalization(ad-personalization-consent);
$contactInfoList->setConsent($consent);

// Assign contactInfoList to edit members request body.
$editMemberRequest->setAddedContactInfoList($contactInfoList);

// Call the API, editing the audience membership.
$response = $this
    ->service
    ->firstAndThirdPartyAudiences
    ->editCustomerMatchMembers(
        audience-id,
        $editMemberRequest
    );

// Display ID of updated audience.
printf(
    'The membership of Customer Match audience ID %s was edited',
    $result['firstAndThirdPartyAudienceId']
);