AI-generated Key Takeaways
- 
          Tags for a placement are generated using a POST request to the specified URL with a user profile ID in the path parameters. 
- 
          The request requires a campaign ID and can optionally include placement IDs and tag formats as query parameters, but the request body must be empty. 
- 
          The response body, if successful, contains a list of generated placement tags with their associated data, including format, impression tag, and click tag. 
- 
          This functionality requires the https://www.googleapis.com/auth/dfatraffickingOAuth scope for authorization.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- PlacementTag
- TagData
- Try it!
Generates tags for a placement.
HTTP request
POST https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/{profileId}/placements/generatetags
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| profileId | 
 User profile ID associated with this request. | 
Query parameters
| Parameters | |
|---|---|
| body | 
 Empty body | 
| placementIds[] | 
 Generate tags for these placements. | 
| campaignId | 
 Generate placements belonging to this campaign. This is a required field. | 
| tagFormats[] | 
 Tag formats to generate for these placements. 
 can only be generated for 1x1 placements. | 
Request body
The request body must be empty.
Response body
Placement GenerateTags Response
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| {
  "placementTags": [
    {
      object ( | 
| Fields | |
|---|---|
| placementTags[] | 
 Set of generated tags for the specified placements. | 
| kind | 
 Identifies what kind of resource this is. Value: the fixed string 
 . | 
Authorization scopes
Requires the following OAuth scope:
- https://www.googleapis.com/auth/dfatrafficking
PlacementTag
Placement Tag
| JSON representation | 
|---|
| {
  "placementId": string,
  "tagDatas": [
    {
      object ( | 
| Fields | |
|---|---|
| placementId | 
 Placement ID | 
| tagDatas[] | 
 Tags generated for this placement. | 
TagData
Placement Tag Data
| JSON representation | 
|---|
| {
  "format": enum ( | 
| Fields | |
|---|---|
| format | 
 TagData tag format of this tag. | 
| impressionTag | 
 Tag string for serving an ad. | 
| clickTag | 
 Tag string to record a click. | 
| adId | 
 Ad associated with this placement tag. Applicable only when 
 is 
 . | 
| creativeId | 
 Creative associated with this placement tag. Applicable only when 
 is 
 . |