สิ่งที่ต้องดำเนินการก่อน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทําตามข้อกําหนดเบื้องต้นเหล่านี้เพื่อติดตั้งใช้งานรีมาร์เก็ตติ้งแบบไดนามิก
ติดตั้งแท็ก Google และข้อมูลโค้ดเหตุการณ์รีมาร์เก็ตติ้ง
เริ่มต้นด้วยการติดแท็กเว็บไซต์สำหรับรีมาร์เก็ตติ้ง
คุณสามารถดึงข้อมูล googleGlobalSiteTag
หรือ event_snippet
จาก API ได้โดยใช้ TagSnippet
ของฟิลด์ conversion_action
ขั้นตอนการฝังแท็กลงในเว็บไซต์ด้วยตนเองมีดังนี้
รับแท็ก Google และข้อมูลโค้ดเหตุการณ์รีมาร์เก็ตติ้ง
แท็ก Google จะตั้งค่าคุกกี้ใหม่ในเว็บไซต์ซึ่งรวบรวมข้อมูล
เกี่ยวกับการคลิกโฆษณาที่นำผู้เข้าชมมายังเว็บไซต์ และเพิ่มผู้เข้าชมเว็บไซต์
ลงในรายการรีมาร์เก็ตติ้งมาตรฐานในบัญชี Google Ads
หากต้องการให้การติดแท็กทํางานร่วมกับรีมาร์เก็ตติ้งแบบไดนามิก ให้เลือกรวบรวม
แอตทริบิวต์หรือพารามิเตอร์เฉพาะเพื่อปรับโฆษณาตามโปรไฟล์ของผู้ใช้ในขั้นตอนสร้างแหล่งข้อมูลแท็ก Google Ads ดังที่แสดงด้านล่าง

ดูวิธีการโดยละเอียดในการรับแท็ก Google และข้อมูลโค้ดเหตุการณ์รีมาร์เก็ตติ้งได้ที่
ติดแท็กเว็บไซต์โดยใช้ Google Ads
ติดตั้งแท็ก Google
คุณต้องติดตั้งแท็ก Google ในทุกหน้าของเว็บไซต์ที่ส่งข้อมูลรีมาร์เก็ตติ้ง แต่ต้องมีเพียงแท็กเดียวในบัญชี Google Ads แต่ละบัญชี คุณสามารถใช้ข้อมูลโค้ดเหตุการณ์เพื่อติดตามการกระทําเพิ่มเติม
ที่ควรนับเป็นเหตุการณ์รีมาร์เก็ตติ้งได้ ติดตั้งข้อมูลโค้ดนี้ในหน้าเว็บไซต์ที่คุณต้องการติดตาม โดยให้อยู่หลังแท็ก Google ในส่วน <head></head>
นอกจากนี้ แท็ก Google ยังทํางานร่วมกับแท็กอื่นๆ เช่น แท็ก Google Analytics ได้ด้วย
อ่านเพิ่มเติมเกี่ยวกับวิธีการทำงานของแท็กใน Google
Analytics
ติดตั้งข้อมูลโค้ดเหตุการณ์ในหน้าเว็บไซต์ที่ต้องการติดตาม โดยมี
ค่าพารามิเตอร์ที่กำหนดเองที่สอดคล้องกัน
พารามิเตอร์ที่กำหนดเองคือองค์ประกอบในโค้ดแท็กรีมาร์เก็ตติ้งที่ช่วยให้แท็กส่งข้อมูลเกี่ยวกับสินค้าหรือการเลือกที่เฉพาะเจาะจงในเว็บไซต์ไปยังบัญชี Google Ads ได้ พารามิเตอร์ที่กำหนดเองเกี่ยวข้องโดยตรงกับฟีดข้อมูลธุรกิจ ซึ่งคุณจะเพิ่มค่าที่สอดคล้องกับข้อมูลที่แท็กรวบรวม
หากต้องการใช้รีมาร์เก็ตติ้งแบบไดนามิก คุณจะต้องใช้พารามิเตอร์ที่กำหนดเองซึ่งทำเครื่องหมายเป็น Required
ตามที่อธิบายไว้ในเหตุการณ์และพารามิเตอร์รีมาร์เก็ตติ้งแบบไดนามิก
เมื่อเพิ่มค่าของพารามิเตอร์ที่กำหนดเองลงในแท็กรีมาร์เก็ตติ้ง
ระบบจะซิงค์กับฟีดเพื่อแสดงผลิตภัณฑ์หรือบริการเดียวกันใน
โฆษณาที่ผู้เข้าชมรายเดียวกันเคยดู
ตัวอย่างวิธีติดตั้งข้อมูลโค้ดเหตุการณ์สำหรับเว็บไซต์ค้าปลีก (โปรดทราบว่า ecomm_prodid
คือ รหัสผลิตภัณฑ์ Merchant Center ที่สอดคล้องกับผลิตภัณฑ์ในหน้าเว็บ)
gtag('event', 'page_view', {
ecomm_pagetype: 'product',
ecomm_prodid: 34592212,
ecomm_totalvalue: 29.99,
ecomm_category: 'Home & Garden',
isSaleItem: false
});
ดูคําจํากัดความโดยละเอียดของพารามิเตอร์และค่าที่ถูกต้องได้ที่
เหตุการณ์และพารามิเตอร์รีมาร์เก็ตติ้งแบบไดนามิก
ชื่อเหตุการณ์ที่คุณใช้ (เช่น page_view
ในตัวอย่างข้างต้น) อาจเป็นชื่อเหตุการณ์ที่กําหนดเองที่คุณเลือก หรือเหตุการณ์มาตรฐานที่แนะนํา
ไม่จำเป็นต้องตรงกับค่าใดค่าหนึ่งเพื่อวัตถุประสงค์ในการติดตั้งใช้งาน
รีมาร์เก็ตติ้งแบบไดนามิก ตราบใดที่ตั้งค่าพารามิเตอร์ข้อมูลเหตุการณ์ (ecomm_pagetype
,
ecomm_prodid
และ ecomm_totalvalue
ในตัวอย่างนี้) อย่างถูกต้อง
ดูเอกสารประกอบโดยละเอียดเกี่ยวกับพารามิเตอร์ที่กําหนดเองสําหรับธุรกิจประเภทต่างๆ
และวิธีทํางานของแท็ก Google ได้ที่
ตั้งค่าเครื่องมือวัด Conversion สําหรับเว็บไซต์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-26 UTC
[null,null,["อัปเดตล่าสุด 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)."]]