Google Ads Ad Manager V1 Client - Class CreativeWrapper (0.14.1)

Reference documentation and code samples for the Google Ads Ad Manager V1 Client class CreativeWrapper.

A CreativeWrapper allows the wrapping of HTML snippets to be served along with Creative objects.

CreativeWrapper must be associated with a LabelType.CREATIVE_WRAPPER label and applied to ad units by AdUnit.appliedLabels.

Generated from protobuf message google.ads.admanager.v1.CreativeWrapper

Namespace

Google \ Ads \ AdManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Identifier. The resource name of the CreativeWrapper. Format: networks/{network_code}/creativeWrappers/{creative_wrapper_id}

↳ label string

Required. Immutable. The resource name of the Label. Format:networks/{network_code}/label/{label_id}

↳ creative_wrapper_type int

Required. The creative_wrapper_type. If the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL, the video_tracking_urls field must be set. If the creative_wrapper_type is CreativeWrapperType.HTML, either the header or footer field must be set.

↳ header_creative string

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

↳ footer_creative string

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

↳ html_header string

Optional. The header HTML snippet that this CreativeWrapper delivers.

↳ html_footer string

Optional. The footer HTML snippet that this CreativeWrapper delivers.

↳ amp_header string

Optional. The header AMP snippet that this CreativeWrapper delivers.

↳ amp_footer string

Optional. The footer AMP snippet that this CreativeWrapper delivers.

↳ video_tracking_urls array<VideoTrackingUrl>

Optional. The video tracking URLs that this CreativeWrapper delivers. This field is required if the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL and ignored otherwise.

↳ third_party_data_declaration ThirdPartyDataDeclaration

Optional. The ThirdPartyDataDeclaration for this creative wrapper. The third party companies that are associated with this CreativeWrapper and are present in the html_header or html_footer. This field is only applicable when the creative_wrapper_type is CreativeWrapperType.HTML.

↳ ordering int

Optional. If there are multiple wrappers for a Creative, then ordering defines the order in which the HTML snippets are rendered.

↳ status int

Output only. The status of the CreativeWrapper.

getName

Identifier. The resource name of the CreativeWrapper.

Format: networks/{network_code}/creativeWrappers/{creative_wrapper_id}

Returns
Type Description
string

setName

Identifier. The resource name of the CreativeWrapper.

Format: networks/{network_code}/creativeWrappers/{creative_wrapper_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getLabel

Required. Immutable. The resource name of the Label.

Format:networks/{network_code}/label/{label_id}

Returns
Type Description
string

setLabel

Required. Immutable. The resource name of the Label.

Format:networks/{network_code}/label/{label_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getCreativeWrapperType

Required. The creative_wrapper_type. If the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL, the video_tracking_urls field must be set. If the creative_wrapper_type is CreativeWrapperType.HTML, either the header or footer field must be set.

Returns
Type Description
int

hasCreativeWrapperType

clearCreativeWrapperType

setCreativeWrapperType

Required. The creative_wrapper_type. If the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL, the video_tracking_urls field must be set. If the creative_wrapper_type is CreativeWrapperType.HTML, either the header or footer field must be set.

Parameter
Name Description
var int
Returns
Type Description
$this

getHeaderCreative

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

Returns
Type Description
string

hasHeaderCreative

clearHeaderCreative

setHeaderCreative

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getFooterCreative

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

Returns
Type Description
string

hasFooterCreative

clearFooterCreative

setFooterCreative

Output only. The resource name of the Creative. Format: networks/{network_code}/creative/{creative_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getHtmlHeader

Optional. The header HTML snippet that this CreativeWrapper delivers.

Returns
Type Description
string

hasHtmlHeader

clearHtmlHeader

setHtmlHeader

Optional. The header HTML snippet that this CreativeWrapper delivers.

Parameter
Name Description
var string
Returns
Type Description
$this

getHtmlFooter

Optional. The footer HTML snippet that this CreativeWrapper delivers.

Returns
Type Description
string

hasHtmlFooter

clearHtmlFooter

setHtmlFooter

Optional. The footer HTML snippet that this CreativeWrapper delivers.

Parameter
Name Description
var string
Returns
Type Description
$this

getAmpHeader

Optional. The header AMP snippet that this CreativeWrapper delivers.

Returns
Type Description
string

hasAmpHeader

clearAmpHeader

setAmpHeader

Optional. The header AMP snippet that this CreativeWrapper delivers.

Parameter
Name Description
var string
Returns
Type Description
$this

getAmpFooter

Optional. The footer AMP snippet that this CreativeWrapper delivers.

Returns
Type Description
string

hasAmpFooter

clearAmpFooter

setAmpFooter

Optional. The footer AMP snippet that this CreativeWrapper delivers.

Parameter
Name Description
var string
Returns
Type Description
$this

getVideoTrackingUrls

Optional. The video tracking URLs that this CreativeWrapper delivers.

This field is required if the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL and ignored otherwise.

Returns
Type Description
Google\Protobuf\RepeatedField<VideoTrackingUrl>

setVideoTrackingUrls

Optional. The video tracking URLs that this CreativeWrapper delivers.

This field is required if the creative_wrapper_type is CreativeWrapperType.VIDEO_TRACKING_URL and ignored otherwise.

Parameter
Name Description
var array<VideoTrackingUrl>
Returns
Type Description
$this

getThirdPartyDataDeclaration

Optional. The ThirdPartyDataDeclaration for this creative wrapper.

The third party companies that are associated with this CreativeWrapper and are present in the html_header or html_footer. This field is only applicable when the creative_wrapper_type is CreativeWrapperType.HTML.

Returns
Type Description
ThirdPartyDataDeclaration|null

hasThirdPartyDataDeclaration

clearThirdPartyDataDeclaration

setThirdPartyDataDeclaration

Optional. The ThirdPartyDataDeclaration for this creative wrapper.

The third party companies that are associated with this CreativeWrapper and are present in the html_header or html_footer. This field is only applicable when the creative_wrapper_type is CreativeWrapperType.HTML.

Parameter
Name Description
var ThirdPartyDataDeclaration
Returns
Type Description
$this

getOrdering

Optional. If there are multiple wrappers for a Creative, then ordering defines the order in which the HTML snippets are rendered.

Returns
Type Description
int

hasOrdering

clearOrdering

setOrdering

Optional. If there are multiple wrappers for a Creative, then ordering defines the order in which the HTML snippets are rendered.

Parameter
Name Description
var int
Returns
Type Description
$this

getStatus

Output only. The status of the CreativeWrapper.

Returns
Type Description
int

hasStatus

clearStatus

setStatus

Output only. The status of the CreativeWrapper.

Parameter
Name Description
var int
Returns
Type Description
$this