ตัวแปร Conversion ที่กำหนดเอง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตัวแปร Conversion ที่กําหนดเอง ช่วยให้คุณเชื่อมโยงข้อมูลเพิ่มเติมในรูปแบบของแท็กกับ Conversion ที่คุณนําเข้าโดยใช้ Google Ads API เช่น Conversion จากการคลิกหรือการโทร ข้อมูลนี้ช่วยให้คุณสร้างรายงานที่แบ่งกลุ่มซึ่งให้ข้อมูลที่สมบูรณ์ยิ่งขึ้นเกี่ยวกับ Conversion
เช่น เมื่อนําเข้า Conversion สําหรับการซื้อหมวกสีน้ำเงินใบใหม่ คุณยังนําเข้าแท็กที่เชื่อมโยง 2 รายการ ได้แก่ color
และ status
ที่มีค่าเป็น blue
และ new
ตามลําดับ มีขั้นตอนดังนี้
สร้างตัวแปร Conversion ที่กำหนดเองได้มากเท่าที่ต้องการ ตัวแปรแต่ละรายการ จะสอดคล้องกับแท็ก 1 รายการ ดังนั้น หากต้องการแท็ก 2 รายการ (color
และ status
) คุณจะต้องสร้างตัวแปรที่กำหนดเอง 2 รายการ ช่องที่ต้องระบุสำหรับ ConversionCustomVariable
มีดังนี้
name
: ระบุตัวแปร ชื่อต้องไม่ซ้ำกัน tag
: สำหรับตัวอย่างของเรา แท็กคือ color
และ status
แท็กจะใช้ในข้อมูลโค้ดเหตุการณ์ เมื่อเว็บไซต์ส่ง Conversion ไปยัง Google Ads หากใช้ Google Ads API คุณจะต้องระบุชื่อทรัพยากรของตัวแปรที่กำหนดเองเมื่อนำเข้า Conversion ตามที่อธิบายไว้ในขั้นตอนถัดไป
เมื่อนําเข้า Conversion เช่น ClickConversion
ให้ตั้งค่า custom_variables
เป็น รายการตัวแปรที่กําหนดเองทั้งหมดที่คุณสร้างไว้ในขั้นตอนก่อนหน้า คุณต้องตั้งค่าฟิลด์ทั้งหมดของตัวแปรที่กำหนดเองแต่ละรายการ ดังนี้
conversion_custom_variable
: ชื่อทรัพยากรของตัวแปรที่กําหนดเองที่คุณสร้างในขั้นตอนก่อนหน้า value
: ค่าสำหรับแท็กที่คุณต้องการเชื่อมโยงกับ Conversion สำหรับตัวอย่างของเรา: blue
และ new
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-26 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-08-26 UTC"],[[["\u003cp\u003eCustom conversion variables allow associating additional information, like tags, to conversions uploaded via the Google Ads API.\u003c/p\u003e\n"],["\u003cp\u003eTo use custom variables, first create them, defining a unique name and tag for each desired piece of information.\u003c/p\u003e\n"],["\u003cp\u003eWhen uploading a conversion, include the custom variables, specifying their resource name and the corresponding value for the tag.\u003c/p\u003e\n"],["\u003cp\u003eThis process lets you add details like 'color' or 'status' to conversions, enabling richer data analysis and reporting.\u003c/p\u003e\n"]]],[],null,["# Custom Conversion Variables\n\n[Custom conversion variables](//support.google.com/google-ads/answer/9964350)\nlet you associate additional information, in the form of tags, to a conversion\nthat you import using the Google Ads API, such as click or call conversions. With this\ninformation, you can create segmented reports that provide richer data about\nyour conversions.\n\nFor example, when importing a conversion for the purchase of a new blue hat,\nyou could also import two associated tags: `color` and `status` with the values\n`blue` and `new`, respectively. Here are the steps:\n\n1. Create as many custom conversion variables as you need. Each variable\n corresponds to one tag. Therefore, if you want two tags (`color` and\n `status`), you need to create two custom variables. The required fields for\n [`ConversionCustomVariable`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable) are as\n follows:\n\n | **Note:** See [`ConversionCustomVariable`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable) for limitations on its fields.\n - [`name`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable#name): Identifies the variable. The name must be unique.\n - [`tag`](/google-ads/api/reference/rpc/v21/ConversionCustomVariable#tag): For our example, the tags are `color` and `status`. Tags are used in the [event\n snippet](//support.google.com/google-ads/answer/9962082#Add&zippy=%2Cconversion-tracking-using-tags-on-your-website) when a conversion is sent to Google Ads by your website. If you use the Google Ads API, you would need to specify the resource name of the custom variables when importing conversions, as detailed in the next step.\n2. When importing a conversion, such as\n [`ClickConversion`](/google-ads/api/reference/rpc/v21/ClickConversion), set\n [`custom_variables`](/google-ads/api/reference/rpc/v21/ClickConversion#custom_variables%5B%5D) to\n the list of all custom variables you created in the previous step. You need\n to set all the fields of each custom variable:\n\n - [`conversion_custom_variable`](/google-ads/api/reference/rpc/v21/CustomVariable#conversion_custom_variable): The resource name of the custom variable you created in the previous step.\n - [`value`](/google-ads/api/reference/rpc/v21/CustomVariable#conversion_custom_variable): The value for the tag you want to associate with the conversion. For our example: `blue` and `new`."]]