Điều kiện tiên quyết
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.
Hãy đáp ứng các điều kiện tiên quyết sau để triển khai tính năng tái tiếp thị linh động.
Cài đặt thẻ Google và đoạn mã sự kiện tái tiếp thị
Bắt đầu bằng cách gắn thẻ trang web để tiếp thị lại.
Bạn có thể truy xuất googleGlobalSiteTag
hoặc event_snippet
từ API bằng cách sử dụng TagSnippet
của trường conversion_action
.
Dưới đây là các bước để nhúng thẻ vào trang web theo cách thủ công:
Nhận thẻ Google và đoạn mã sự kiện tái tiếp thị.
Thẻ Google đặt một cookie mới trên trang web của bạn để thu thập thông tin về lượt nhấp vào quảng cáo đã đưa khách truy cập đến trang web của bạn và thêm khách truy cập trang web vào danh sách tái tiếp thị tiêu chuẩn trong tài khoản Google Ads.
Để đảm bảo hoạt động gắn thẻ hoạt động với tính năng tái tiếp thị linh động, hãy chọn Thu thập các thuộc tính hoặc thông số cụ thể để cá nhân hoá quảng cáo trong bước Tạo nguồn dữ liệu thẻ Google Ads, như minh hoạ dưới đây:

Để biết hướng dẫn chi tiết về cách lấy thẻ Google và đoạn mã sự kiện tiếp thị lại, hãy xem bài viết Gắn thẻ trang web của bạn bằng Google Ads.
Cài đặt thẻ Google.
Bạn phải cài đặt thẻ Google trên tất cả các trang của trang web gửi thông tin tái tiếp thị, nhưng chỉ cần một thẻ Google cho mỗi tài khoản Google Ads. Bạn có thể sử dụng đoạn mã sự kiện để theo dõi những hành động khác cần tính là sự kiện tái tiếp thị. Hãy cài đặt đoạn mã này trên các trang của trang web mà bạn muốn theo dõi, ngay sau thẻ Google trong mục <head></head>
.
Thẻ Google cũng hoạt động với các thẻ khác, chẳng hạn như thẻ Google Analytics.
Đọc thêm về cách thẻ hoạt động trong Google Analytics.
Cài đặt một đoạn mã sự kiện trên những trang của trang web mà bạn muốn theo dõi, với các giá trị thông số tuỳ chỉnh tương ứng.
Thông số tuỳ chỉnh là các phần tử trong mã thẻ tái tiếp thị, cho phép thẻ của bạn gửi thông tin về các mục hoặc lựa chọn cụ thể trên trang web đến tài khoản Google Ads. Thông số tuỳ chỉnh có liên quan trực tiếp đến nguồn cấp dữ liệu doanh nghiệp, trong đó bạn thêm các giá trị tương ứng với thông tin mà thẻ thu thập.
Để sử dụng tính năng tái tiếp thị linh động, bạn cần sử dụng các thông số tuỳ chỉnh được đánh dấu là Required
, như mô tả trong bài viết Sự kiện và thông số tái tiếp thị linh động.
Khi bạn thêm giá trị của một thông số tuỳ chỉnh vào thẻ tái tiếp thị, giá trị đó sẽ đồng bộ hoá với nguồn cấp dữ liệu để hiển thị cùng một sản phẩm hoặc dịch vụ trong quảng cáo mà trước đây khách truy cập đó đã xem.
Dưới đây là ví dụ về cách cài đặt một đoạn mã sự kiện cho một trang web bán lẻ (lưu ý rằng ecomm_prodid
là Mã sản phẩm của Merchant Center tương ứng với sản phẩm trên trang):
gtag('event', 'page_view', {
ecomm_pagetype: 'product',
ecomm_prodid: 34592212,
ecomm_totalvalue: 29.99,
ecomm_category: 'Home & Garden',
isSaleItem: false
});
Để biết định nghĩa chi tiết về các tham số và giá trị hợp lệ của tham số, hãy xem bài viết Sự kiện và tham số tái tiếp thị linh động.
Tên sự kiện mà bạn sử dụng (chẳng hạn như page_view
trong ví dụ trên) có thể là tên sự kiện tuỳ chỉnh do bạn chọn hoặc một trong các sự kiện tiêu chuẩn được đề xuất của chúng tôi.
Bạn không cần phải so khớp bất kỳ giá trị cụ thể nào cho mục đích triển khai tính năng tái tiếp thị linh động, miễn là bạn đặt đúng các thông số dữ liệu sự kiện (ecomm_pagetype
, ecomm_prodid
và ecomm_totalvalue
trong ví dụ này).
Để xem tài liệu chi tiết về các thông số tuỳ chỉnh cho nhiều loại hình doanh nghiệp và cách thẻ Google hoạt động, hãy tham khảo bài viết Thiết lập tính năng theo dõi lượt chuyển đổi cho trang web.
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-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-26 UTC."],[[["\u003cp\u003eInstall the Google tag and remarketing event snippet on all website pages to enable dynamic remarketing.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting up the Google tag, ensure you select "Collect specific attributes or parameters to personalize ads" for dynamic remarketing functionality.\u003c/p\u003e\n"],["\u003cp\u003eUtilize custom parameters within the event snippet to send specific product or service information to your Google Ads account for targeted ads.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the custom parameters, such as 'ecomm_prodid', align with your business data feeds for accurate product or service synchronization in ads.\u003c/p\u003e\n"]]],[],null,["# Prerequisites\n\nFollow these prerequisites to implement dynamic remarketing.\n\nInstall Google tag and remarketing event snippet\n------------------------------------------------\n\nBegin by\n[tagging your site for remarketing](//support.google.com/google-ads/answer/2476688).\nYou can retrieve the `googleGlobalSiteTag` or `event_snippet` from the API using\nthe [`TagSnippet`](/google-ads/api/reference/rpc/v21/TagSnippet) of the\n[`conversion_action`](/google-ads/api/fields/v21/conversion_action) field.\n\nHere are the steps for embedding tags in your website manually:\n\n1. **Get the Google tag and the remarketing event snippet.**\n\n The Google tag sets a new cookie on your site which collects information\n about the ad click that brought a visitor to your site and adds website\n visitors to standard remarketing lists in your Google Ads account.\n\n To make sure the tagging works with dynamic remarketing, select **Collect\n specific attributes or parameters to personalize ads** during the step\n **Create the Google Ads tag data source**, as shown below:\n\n For detailed instructions for acquiring the Google tag and remarketing event\n snippet, see\n [Tag your website using Google Ads](//support.google.com/google-ads/answer/2476688).\n2. **Install the Google tag.**\n\n You must install the Google tag on all the pages of your website that\n send remarketing information, but you need only one Google tag for each\n Google Ads account. The event snippet can be used to track additional actions\n that are to be counted as remarketing events. Install this snippet on site\n pages you'd like to track, right after the Google tag in the\n `\u003chead\u003e\u003c/head\u003e` section.\n\n The Google tag also works with other tags such as Google Analytics tags.\n [Read more about how tags work in Google\n Analytics](/analytics/devguides/collection/gtagjs).\n3. **Install an event snippet on site pages you would like to track, with\n corresponding custom parameter values.**\n\n Custom parameters are elements in your remarketing tag code that allow your\n tag to send information about specific items or selections on your website to\n your Google Ads account. Custom parameters are directly related to business\n data feeds, where you add the values that correspond to the information\n the tag collects.\n\n To use dynamic remarketing, you'll need to use the custom parameters marked\n as `Required`, as described in\n [Dynamic remarketing events and parameters](//support.google.com/google-ads/answer/7305793).\n\n When you add the value of a custom parameter to your remarketing tag,\n it will sync with your feed to show the same product or service in\n your ads previously viewed by the same visitor.\n\n Here is an example of how to install an event snippet for a retail site (note\n the `ecomm_prodid` is the [Merchant Center Product\n ID](//support.google.com/merchants/answer/7052112) that corresponds to the\n product on the page): \n\n gtag('event', 'page_view', {\n ecomm_pagetype: 'product',\n ecomm_prodid: 34592212,\n ecomm_totalvalue: 29.99,\n ecomm_category: 'Home & Garden',\n isSaleItem: false\n });\n\n For detailed definitions of the parameters and their valid values,\n see\n [Dynamic remarketing events and parameters](//support.google.com/google-ads/answer/7305793).\n\n The event name you use (such as `page_view` in the above example) can be a\n custom event name of your choosing or one of our recommended standard events.\n It doesn't need to match any specific value for the purpose of implementing\n dynamic remarketing, as long as the event data parameters (`ecomm_pagetype`,\n `ecomm_prodid`, and `ecomm_totalvalue` in this example) are correctly set.\n\n For detailed documentation on custom parameters for different business types\n and how the Google tag works, refer to\n [Set up conversion tracking for your website](//support.google.com/google-ads/answer/12216424)."]]