Conversion: insert
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
將一批新的轉換插入 DoubleClick Search。
立即試用。
要求
HTTP 要求
POST https://www.googleapis.com/doubleclicksearch/v2/conversion
授權
此要求需要具有下列範圍的授權:
範圍 |
https://www.googleapis.com/auth/doubleclicksearch |
詳情請參閱「驗證與授權」網頁。
要求主體
在要求主體中,提供含有下列屬性的轉換資源:
屬性名稱 |
值 |
說明 |
附註 |
必要屬性 |
conversion[].conversionId |
string |
如果是離線轉換,廣告客戶請提供這個 ID。廣告客戶可以指定有意義的 ID。要求中的每次轉換必須指定一個專屬 ID,且廣告客戶所有轉換的 ID 與時間戳記組合都不得重複。 如果是線上轉換,DS 會根據廣告客戶的 Floodlight 指示,將 dsConversionId 或 floodlightOrderId 複製到這項資源中。 |
|
conversion[].conversionTimestamp |
unsigned long |
轉換發生時間,以毫秒為單位 (世界標準時間)。 |
|
conversion[].segmentationType |
string |
這次轉換的區隔類型 (例如 FLOODLIGHT )。
可接受的值為:
|
|
回應
成功的話,這個方法會在回應主體中傳回轉換資源。
試試看!
使用下方的 APIs Explorer,針對即時資料呼叫這個方法,看看會有什麼結果。
您也可以改用
獨立式
Explorer。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-20 (世界標準時間)。
[null,null,["上次更新時間:2024-08-20 (世界標準時間)。"],[[["\u003cp\u003eInserts a batch of new conversions into DoubleClick Search using the provided Conversion resource and requires authorization with the \u003ccode\u003edoubleclicksearch\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eEach conversion requires a unique ID, timestamp, and segmentation type (e.g., FLOODLIGHT).\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return a Conversion resource in the response body.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows insertion of both offline and online conversions, with specific ID handling for each.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can test the method using the provided APIs Explorer or the standalone Explorer.\u003c/p\u003e\n"]]],["This outlines how to insert new conversions into DoubleClick Search using a POST request to the specified endpoint. Authorization with the `https://www.googleapis.com/auth/doubleclicksearch` scope is required. The request body should include a Conversion resource containing properties like `conversionId` (unique identifier), `conversionTimestamp` (time of conversion in UTC), and `segmentationType` (e.g., `FLOODLIGHT`). Successful requests return a Conversion resource in the response body.\n"],null,["# Conversion: insert\n\n| **Note:** Requires [authorization](#auth).\n\nInserts a batch of new conversions into DoubleClick Search.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/doubleclicksearch/v2/conversion\n```\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/doubleclicksearch` |\n\nFor more information, see the [authentication and authorization](/search-ads/v2/authorizing) page.\n\n### Request body\n\nIn the request body, supply a [Conversion resource](/search-ads/v2/reference/conversion#resource) with the following properties:\n\n| Property name | Value | Description | Notes |\n|------------------------------------|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| **Required Properties** ||||\n| conversion[].`conversionId` | `string` | For offline conversions, advertisers provide this ID. Advertisers can specify any ID that is meaningful to them. Each conversion in a request must specify a unique ID, and the combination of ID and timestamp must be unique amongst all conversions within the advertiser. For online conversions, DS copies the `dsConversionId` or `floodlightOrderId` into this property depending on the advertiser's Floodlight instructions. | |\n| conversion[].`conversionTimestamp` | `unsigned long` | The time at which the conversion took place, in epoch millis UTC. | |\n| conversion[].`segmentationType` | `string` | The segmentation type of this conversion (for example, `FLOODLIGHT`). \u003cbr /\u003e Acceptable values are: - \"`FLOODLIGHT`\" | |\n\nResponse\n--------\n\nIf successful, this method returns a [Conversion resource](/search-ads/v2/reference/conversion#resource) in the response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response.\nAlternatively, try the\n[standalone\nExplorer](https://developers.google.com/apis-explorer/#p/doubleclicksearch/v2/doubleclicksearch.conversion.insert)."]]