Method: placements.generatetags
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-16 UTC.
[null,null,["Last updated 2024-10-16 UTC."],[[["\u003cp\u003eGenerates tags, including impression and click tags, for specified placements within a campaign.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003edfatrafficking\u003c/code\u003e OAuth scope and utilizes a POST request to the designated endpoint.\u003c/p\u003e\n"],["\u003cp\u003eSupports various tag formats, such as standard and tracking tags, with standard tags limited to 1x1 placements.\u003c/p\u003e\n"],["\u003cp\u003eReturns a response containing a set of generated tags for each requested placement, including associated ad and creative IDs when applicable.\u003c/p\u003e\n"],["\u003cp\u003eProvides details on path and query parameters, request and response body structures, and relevant data objects like PlacementTag and TagData.\u003c/p\u003e\n"]]],[],null,["# Method: placements.generatetags\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PlacementsGenerateTagsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [PlacementTag](#PlacementTag)\n - [JSON representation](#PlacementTag.SCHEMA_REPRESENTATION)\n- [TagData](#TagData)\n - [JSON representation](#TagData.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nGenerates tags for a placement.\n\n### HTTP request\n\n`POST https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/{profileId}/placements/generatetags`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `profile``Id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` User profile ID associated with this request. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `body` | `object` Empty body |\n| `placement``Ids[]` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Generate tags for these placements. |\n| `campaign``Id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Generate placements belonging to this campaign. This is a required field. |\n| `tag``Formats[]` | `enum (`[PlacementTagFormat](/doubleclick-advertisers/rest/v4/placements#PlacementTagFormat)`)` Tag formats to generate for these placements. **Note:** `PLACEMENT_TAG_STANDARD` can only be generated for 1x1 placements. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nPlacement GenerateTags Response\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"placementTags\": [ { object (/doubleclick-advertisers/rest/v4/placements/generatetags#PlacementTag) } ], \"kind\": string } ``` |\n\n| Fields ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `placement``Tags[]` | `object (`[PlacementTag](/doubleclick-advertisers/rest/v4/placements/generatetags#PlacementTag)`)` Set of generated tags for the specified placements. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string `\"dfareporting#placementsGenerateTagsResponse\"` . |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/dfatrafficking`\n\nPlacementTag\n------------\n\nPlacement Tag\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"placementId\": string, \"tagDatas\": [ { object (/doubleclick-advertisers/rest/v4/placements/generatetags#TagData) } ] } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------|\n| `placement``Id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Placement ID |\n| `tag``Datas[]` | `object (`[TagData](/doubleclick-advertisers/rest/v4/placements/generatetags#TagData)`)` Tags generated for this placement. |\n\nTagData\n-------\n\nPlacement Tag Data\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"format\": enum (/doubleclick-advertisers/rest/v4/placements#PlacementTagFormat), \"impressionTag\": string, \"clickTag\": string, \"adId\": string, \"creativeId\": string } ``` |\n\n| Fields ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `format` | `enum (`[PlacementTagFormat](/doubleclick-advertisers/rest/v4/placements#PlacementTagFormat)`)` TagData tag format of this tag. |\n| `impression``Tag` | `string` Tag string for serving an ad. |\n| `click``Tag` | `string` Tag string to record a click. |\n| `ad``Id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Ad associated with this placement tag. Applicable only when `format` is `PLACEMENT_TAG_TRACKING` . |\n| `creative``Id` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Creative associated with this placement tag. Applicable only when `format` is `PLACEMENT_TAG_TRACKING` . |"]]