이제 Display & Video 360 API에서 디맨드젠 캠페인 리소스 관리를 지원합니다.
새 가이드 를 참고하여 디맨드젠 광고 캠페인을 만들고 운영하는 방법을 알아보세요.
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
의견 보내기
동영상 광고 소재 만들기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
동영상 광고 소재를 만드는 방법은 다음과 같습니다.
참고: AI를 사용하여 광고 소재를 생성 또는 수정한 것으로 라벨을 지정하는 방법에 관한 자세한 내용은 광고의 AI 콘텐츠 라벨 지정 가이드를 참고하세요.
자바
// Provide the parent advertiser ID to create the creative under.
long advertiserId = advertiser - id ;
// Provide the display name of the creative.
String displayName = display - name ;
// Provide the media ID of the uploaded video file.
long videoMediaId = video - media - id ;
// Provide the URL of the page that the creative redirects to and the name
// of the click tag used in the exit event.
String exitEventUrl = exit - event - url ;
String exitEventName = exit - event - name ;
// Create a creative object.
Creative creative =
new Creative ()
. setDisplayName ( displayName )
. setEntityStatus ( "ENTITY_STATUS_ACTIVE" )
. setHostingSource ( "HOSTING_SOURCE_HOSTED" )
. setCreativeType ( "CREATIVE_TYPE_VIDEO" );
// Assign the video asset to a role.
AssetAssociation assetAssociation =
new AssetAssociation ()
. setAsset ( new Asset (). setMediaId ( videoMediaId ))
. setRole ( "ASSET_ROLE_MAIN" );
// Create and set the list of creative assets.
creative . setAssets ( ImmutableList . of ( assetAssociation ));
// Create an exit event.
ExitEvent exitEvent =
new ExitEvent ()
. setName ( exitEventName )
. setType ( "EXIT_EVENT_TYPE_DEFAULT" )
. setUrl ( exitEventUrl );
// Create and set the list of exit events for the creative.
creative . setExitEvents ( ImmutableList . of ( exitEvent ));
// Configure the create request.
Creatives . Create request = service . advertisers (). creatives (). create ( advertiserId , creative );
// Send the request.
Creative response = request . execute ();
// Display ID of the new creative.
System . out . printf ( "Creative was created with ID %s." , response . getCreativeId ());
Python
# Provide the parent advertiser ID to create the creative under.
advertiser_id = advertiser - id
# Provide the display name of the creative.
display_name = display - name
# Provide the media ID of the uploaded video file.
video_media_id = video - media - id
# Provide the URL of the page that the creative redirects to and the name of the
# click tag used in the exit event.
exit_event_url = exit - event - url
exit_event_name = exit - event - name
# Build the creative object.
creative_obj = {
"displayName" : display_name ,
"entityStatus" : "ENTITY_STATUS_ACTIVE" ,
"hostingSource" : "HOSTING_SOURCE_HOSTED" ,
"creativeType" : "CREATIVE_TYPE_VIDEO" ,
"assets" : [{
"asset" : { "mediaId" : video_media_id },
"role" : "ASSET_ROLE_MAIN" ,
}],
"exitEvents" : [{
"name" : exit_event_name ,
"type" : "EXIT_EVENT_TYPE_DEFAULT" ,
"url" : exit_event_url ,
}],
}
# Create the creative.
creative_response = (
service . advertisers ()
. creatives ()
. create ( advertiserId = advertiser_id , body = creative_obj )
. execute ()
)
# Print the resulting creative ID.
print ( f 'Creative was created with ID { creative_response [ "creativeId" ] } .' )
PHP
// Provide the parent advertiser ID to create the creative under.
$advertiserId = advertiser-id ;
// Provide the display name of the creative.
$displayName = display-name ;
// Provide the media ID of the uploaded video file.
$videoMediaId = video-media-id ;
// Provide the URL of the page that the creative redirects to and the name
// of the click tag used in the exit event.
$exitEventUrl = exit-event-url ;
$exitEventName = exit-event-name ;
// Create a creative object.
$creative = new Google_Service_DisplayVideo_Creative();
$creative->setDisplayName($displayName);
$creative->setEntityStatus('ENTITY_STATUS_ACTIVE');
$creative->setHostingSource('HOSTING_SOURCE_HOSTED');
$creative->setCreativeType('CREATIVE_TYPE_VIDEO');
// Create an exit event.
$exitEvent = new Google_Service_DisplayVideo_ExitEvent();
$exitEvent->setName($exitEventName);
$exitEvent->setType('EXIT_EVENT_TYPE_DEFAULT');
$exitEvent->setUrl($exitEventUrl);
$creative->setExitEvents(array($exitEvent));
// Assign the video asset to a role.
$assetAssociation = new Google_Service_DisplayVideo_AssetAssociation();
$asset = new Google_Service_DisplayVideo_Asset();
$asset->setMediaId($videoMediaId);
$assetAssociation->setAsset($asset);
$assetAssociation->setRole('ASSET_ROLE_MAIN');
$creative->setAssets(array($assetAssociation));
// Upload and set the asset and create the video creative under the
// given advertiser.
try {
$result = $this->service->advertisers_creatives->create(
$advertiserId,
$creative
);
} catch (\Exception $e) {
$this->renderError($e);
return;
}
// Display ID of the new creative.
printf('<p>Creative was created with ID %s.</p>', $result['creativeId']);
의견 보내기
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스 에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스 에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책 을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2026-07-23(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"]],["최종 업데이트: 2026-07-23(UTC)"],[],[]]