PHP Class DynamicSearchAd, googleads-php-lib

Auto-generated fields: headline and optional tracking URL.

Required fields: {@code description1}, {@code description2}, {@code displayUrl}.

The tracking URL field must contain at least one of the following placeholder tags (URL parameters):

  • {unescapedlpurl}
  • {escapedlpurl}
  • {lpurl}
  • {lpurl+2}
  • {lpurl+3}
  • {unescapedlpurl} will be replaced with the full landing page URL of the displayed ad. Extra query parameters can be added to the end, e.g.: "{unescapedlpurl}?lang=en".
  • {escapedlpurl} will be replaced with the URL-encoded version of the full landing page URL. This makes it suitable for use as a query parameter value (e.g.: "http://www.3rdpartytracker.com/?lp={escapedlpurl}") but not at the beginning of the URL field.
  • {lpurl} encodes the "?" and "=" of the landing page URL making it suitable for use as a query parameter. If found at the beginning of the URL field, it is replaced by the {unescapedlpurl} value. E.g.: "http://tracking.com/redir.php?tracking=xyz&url={lpurl}".
  • {lpurl+2} and {lpurl+3} will be replaced with the landing page URL escaped two or three times, respectively. This makes it suitable if there is a chain of redirects in the tracking URL.

Note that {@code finalUrls} and {@code finalMobileUrls} cannot be set for dynamic search ads.

For more information, see the article Using dynamic tracking URLs.

This is disabled for AdX when it is contained within Operators: ADD, SET.
Inheritance: extends Ad
Show file Open project: googleads/googleads-php-lib

Public Properties

Property Type Description
$description1 string
$description2 string

Public Methods

Method Description
__construct ( $description1 = null, $description2 = null, $id = null, $url = null, $displayUrl = null, $finalUrls = null, $finalMobileUrls = null, $finalAppUrls = null, $trackingUrlTemplate = null, $urlCustomParameters = null, $type = null, $devicePreference = null, $AdType = null )
getNamespace ( ) : string Gets the namesapce of this class
getXsiTypeName ( ) : string Gets the xsi:type name of this class

Method Details

__construct() public method

public __construct ( $description1 = null, $description2 = null, $id = null, $url = null, $displayUrl = null, $finalUrls = null, $finalMobileUrls = null, $finalAppUrls = null, $trackingUrlTemplate = null, $urlCustomParameters = null, $type = null, $devicePreference = null, $AdType = null )

getNamespace() public method

Gets the namesapce of this class
public getNamespace ( ) : string
return string the namespace of this class

getXsiTypeName() public method

Gets the xsi:type name of this class
public getXsiTypeName ( ) : string
return string the xsi:type name of this class

Property Details

$description1 public property

public string $description1
return string

$description2 public property

public string $description2
return string