Biến lượt chuyển đổi tuỳ chỉnh
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Biến lượt chuyển đổi tuỳ chỉnh cho phép bạn liên kết thông tin bổ sung (dưới dạng thẻ) với một lượt chuyển đổi mà bạn nhập bằng API Google Ads, chẳng hạn như lượt chuyển đổi từ lượt nhấp hoặc cuộc gọi. Với thông tin này, bạn có thể tạo báo cáo được phân đoạn để cung cấp dữ liệu phong phú hơn về lượt chuyển đổi.
Ví dụ: khi nhập một lượt chuyển đổi cho giao dịch mua một chiếc mũ màu xanh dương mới, bạn cũng có thể nhập hai thẻ liên kết: color
và status
với các giá trị tương ứng là blue
và new
. Sau đây là các bước:
Tạo số lượng biến chuyển đổi tuỳ chỉnh tuỳ theo nhu cầu của bạn. Mỗi biến tương ứng với một thẻ. Do đó, nếu muốn có hai thẻ (color
và status
), bạn cần tạo hai biến tuỳ chỉnh. Các trường bắt buộc cho ConversionCustomVariable
như sau:
name
: Xác định biến. Tên phải là duy nhất. tag
: Trong ví dụ này, các thẻ là color
và status
. Thẻ được sử dụng trong mảnh sự kiện khi trang web của bạn gửi một lượt chuyển đổi đến Google Ads. Nếu sử dụng API Google Ads, bạn cần chỉ định tên tài nguyên của biến tuỳ chỉnh khi nhập lượt chuyển đổi, như được nêu chi tiết trong bước tiếp theo.
Khi nhập một lượt chuyển đổi, chẳng hạn như ClickConversion
, hãy đặt custom_variables
thành danh sách tất cả biến tuỳ chỉnh mà bạn đã tạo ở bước trước. Bạn cần đặt tất cả các trường của từng biến tuỳ chỉnh:
conversion_custom_variable
: Tên tài nguyên của biến tuỳ chỉnh mà bạn đã tạo ở bước trước. value
: Giá trị cho thẻ mà bạn muốn liên kết với lượt chuyển đổi. Ví dụ: blue
và new
.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-21 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-21 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](//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/v20/ConversionCustomVariable) are as\n follows:\n\n | **Note:** See [`ConversionCustomVariable`](/google-ads/api/reference/rpc/v20/ConversionCustomVariable) for limitations on its fields.\n - [`name`](/google-ads/api/reference/rpc/v20/ConversionCustomVariable#name): Identifies the variable. The name must be unique.\n - [`tag`](/google-ads/api/reference/rpc/v20/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/v20/ClickConversion), set\n [`custom_variables`](/google-ads/api/reference/rpc/v20/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/v20/CustomVariable#conversion_custom_variable): The resource name of the custom variable you created in the previous step.\n - [`value`](/google-ads/api/reference/rpc/v20/CustomVariable#conversion_custom_variable): The value for the tag you want to associate with the conversion. For our example: `blue` and `new`."]]