Credential manager ก บการไม ม รห สผ าน

ใช้แท็ก Google สําหรับการวัด Conversion ใน Floodlight

ถัดไป: เครื่องมือวัด Conversion ข้ามโดเมน

The Google tag streamlines tagging across Google’s site measurement, conversion tracking, and remarketing products. To record a Floodlight conversion, a Google tag contains two code snippets – a global snippet that you install on every page of your site, and a Floodlight event snippet that you install on the conversion page.

เมื่อคุณสร้างกิจกรรม Floodlight ระบบของ Search Ads 360 จะสร้างข้อมูลโค้ดที่ติดทั่วเว็บไซต์และข้อมูลโค้ดเหตุการณ์โดยอัตโนมัติ บทความนี้อธิบายช่องในข้อมูลโค้ดที่ Search Ads 360 สร้างขึ้น

หมายเหตุ: หากสร้างกิจกรรม Floodlight จาก Campaign Manager 360 คุณอาจเห็น

ข้อมูลโค้ดที่ติดทั่วเว็บไซต์

Accelerated Mobile Pages ต้องใช้แท็กที่แตกต่างจากหน้าสำหรับเดสก์ท็อปและหน้าสำหรับอุปกรณ์เคลื่อนที่แบบดั้งเดิม พิจารณาว่าจะกำหนดค่าหน้าเว็บสำหรับแท็กใดก่อนทำให้แท็กใช้งานได้

สำหรับหน้าที่ไม่ใช่ Accelerated Mobile Pages

ตัวอย่างนี้คือข้อมูลโค้ดที่ติดทั่วเว็บไซต์สำหรับหน้าที่ไม่ใช่ Accelerated Mobile Pages ข้อมูลโค้ดนี้ควรวางไว้ระหว่างแท็ก กับ ในทุกหน้าของเว็บไซต์

`<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

`

มาดูรายละเอียดของช่องหลักในข้อมูลโค้ดที่ติดทั่วเว็บไซต์กัน

  • src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID" แสดงตัวระบุของบัญชีที่สร้างแท็กขึ้นในตอนแรก เมื่อคุณสร้างแท็กจาก Search Ads 360 หรือ Campaign Manager 360 นี่คือรหัสการกำหนดค่า Floodlight
  • gtag('config', 'DCM_FLOODLIGHT_CONFIG_ID'); คำสั่ง config จะระบุการกำหนดค่า Floodlight ที่เชื่อมโยงกับแท็ก หากต้องการดูรหัสนี้ใน Search Ads 360 ให้ทำดังนี้
    1. คลิกการตั้งค่าผู้ลงโฆษณาในแผงการนําทางด้านซ้าย
    2. ในแท็บการตั้งค่าผู้ลงโฆษณา รหัส Floodlight จะปรากฏในช่องรหัส Floodlight ของ Campaign Manager 360 หากใช้แท็ก Google ที่มีการกำหนดค่า Floodlight หรือผลิตภัณฑ์ Google หลายรายการ เว็บไซต์จะมีข้อมูลโค้ดที่ติดทั่วเว็บไซต์ซึ่งมีคำสั่ง config อยู่แล้ว ในกรณีนี้ เพียงเพิ่มคำสั่ง config ของผู้ลงโฆษณารายนี้ลงในข้อมูลโค้ดที่ติดทั่วเว็บไซต์ซึ่งมีอยู่ในทุกหน้าของเว็บไซต์ ดูข้อมูลเพิ่มเติมเกี่ยวกับการใช้แท็ก Google สำหรับเครื่องมือวัด Conversion ของ Floodlight

คุณไม่ควรส่งข้อมูลในช่องของข้อมูลโค้ดที่ติดทั่วเว็บไซต์แบบไดนามิก เมื่อติดตั้งในเว็บไซต์โดยใช้ตัวระบุบัญชีที่ถูกต้องแล้ว ข้อมูลโค้ดที่ติดทั่วเว็บไซต์ก็สมบูรณ์

สำหรับ Accelerated Mobile Pages

ตัวอย่างนี้คือข้อมูลโค้ดที่ติดทั่วเว็บไซต์สำหรับ Accelerated Mobile Pages ข้อมูลโค้ดนี้ควรวางไว้ระหว่างแท็ก กับ ในทุกหน้าของเว็บไซต์

``0

มาดูรายละเอียดของช่องหลักในแท็ก Google กัน

  • configRewriter ช่องนี้ระบุว่ามีการกำหนดค่าหน้าเว็บสำหรับการรายงานเกี่ยวกับผลการค้นหาทั่วไปหรือไม่
  • dc_natural_search ช่องนี้มีพารามิเตอร์การยกเว้น และรายการเครื่องมือที่จะกำหนดเป้าหมาย

คุณไม่ควรส่งข้อมูลในช่องของแท็ก Google แบบไดนามิก เมื่อติดตั้งในเว็บไซต์โดยใช้ตัวระบุบัญชีที่ถูกต้องแล้ว แท็ก Google ก็สมบูรณ์

ข้อมูลโค้ดเหตุการณ์

ตัวอย่างนี้คือข้อมูลโค้ดเหตุการณ์ที่ Search Ads 360 สร้างขึ้นสำหรับกิจกรรมธุรกรรม ข้อมูลโค้ดเหตุการณ์ควรวางไว้ในหน้าเว็บซึ่งมีเหตุการณ์ที่กำลังติดตาม โดยวางในหน้าเว็บใดก็ได้หลังข้อมูลโค้ดที่ติดทั่วเว็บไซต์ แต่เราขอแนะนำให้วางไว้ในส่วน เพื่อให้การติดตามแม่นยำที่สุด

คุณต้องตั้งค่าให้บางช่องแบบไดนามิกโดยใช้ข้อมูลจาก Conversion ที่กำลังบันทึก ในตัวอย่างด้านล่าง ตัวยึดตำแหน่งสำหรับค่าแบบไดนามิกจะปรากฏในวงเล็บ เช่น ``2

``3

มาดูรายละเอียดของช่องหลักในข้อมูลโค้ดเหตุการณ์กัน

  • ``4 เปิดใช้แท็ก Floodlight แบบไดนามิก กิจกรรมทั้งหมดที่สร้างใน Search Ads 360 จะสร้างแท็กแบบไดนามิก และต้องตั้งค่าช่องนี้เป็น ``5 เพื่อให้แท็กแบบไดนามิกทำงานได้อย่างถูกต้อง
  • ``6 สำหรับข้อมูลโค้ดเหตุการณ์ของธุรกรรมเท่านั้น จำนวนรายได้ที่เกิดจาก Conversion หรือก็คือราคาซื้อของสินค้าที่ขาย ในกรณีส่วนใหญ่ มูลค่าที่เกี่ยวข้องคือรายได้ที่เกิดขึ้น ไม่ใช่ราคาซื้อรวม ซึ่งอาจรวมถึงภาษีการขาย, VAT, ค่าจัดส่ง หรือต้นทุนอื่นๆ ระบุตัวเลขที่ไม่มีคอมมาหรือสัญลักษณ์สกุลเงิน คุณใช้จุดทศนิยม (.) ได้ หากต้องการ
  • ``7 สำหรับข้อมูลโค้ดเหตุการณ์ของธุรกรรมเท่านั้น ตัวระบุที่ไม่ซ้ำกันซึ่งคุณสร้างขึ้นแบบไดนามิกสำหรับธุรกรรมแต่ละรายการ รหัสคำสั่งซื้อต้องเป็นตัวเลขที่มากกว่า 0 รหัสคำสั่งซื้อมีอยู่ในรายงานเส้นทางที่ทำให้เกิด Conversion (P2C) ในเครื่องมือสร้างรายงาน
  • ​``8

    ระบุกิจกรรม Floodlight ที่เชื่อมโยงกับแท็กนี้ พร้อมกับวิธีการนับ

    • [floodlightConfigID]: ระบุการกำหนดค่า Floodlight ที่เชื่อมโยงกับข้อมูลโค้ดเหตุการณ์ ซึ่งเป็นค่าเดียวกันกับที่ปรากฏในคำสั่ง 'config' ของข้อมูลโค้ดที่ติดทั่วเว็บไซต์
    • [activityGroupTagString]/[activityTagString]: ระบุกิจกรรมและกลุ่มกิจกรรม Search Ads 360 จะสร้างสตริงเหล่านี้เมื่อคุณสร้างกลุ่มกิจกรรมและกิจกรรม หากต้องการดูสตริงเหล่านี้ใน Search Ads 360 ให้ทำดังนี้
      1. คลิกการตั้งค่าผู้ลงโฆษณาในแผงการนําทางด้านซ้าย
      2. คลิกแท็บ Floodlight ▼ แล้วเลือกกิจกรรม Floodlight
      3. ตารางการรายงานประกอบด้วยคอลัมน์สตริงแท็กกิจกรรมและคอลัมน์สตริงแท็กกลุ่มกิจกรรม Floodlight
              ในแถวตารางที่แสดงกิจกรรม Floodlight ค่าในคอลัมน์เหล่านี้จะตรงกับค่าในคำสั่ง send\_to ในข้อมูลโค้ดเหตุการณ์ของกิจกรรม  
    • \[countingMethod\]: ระบุวิธีที่กิจกรรมนับ Conversion ข้อมูลโค้ดเหตุการณ์ที่สร้างจาก Search Ads 360 จะระบุวิธีการนับวิธีใดอย่างหนึ่งต่อไปนี้ ข้อมูลโค้ดเหตุการณ์ที่สร้างใน Campaign Manager 360 อาจระบุวิธีการนับอื่นๆ
      • Standard นับ Conversion ทุกรายการตามผู้ใช้ทุกคน วิธีการนับนี้มีไว้สำหรับกิจกรรมการกระทำที่สร้างใน Search Ads 360
      • Transactions นับจำนวนธุรกรรมที่เกิดขึ้นและต้นทุนของธุรกรรมแต่ละรายการ ตัวอย่างเช่น หากผู้ใช้เข้าชมเว็บไซต์และซื้อหนังสือ 5 เล่มในราคารวม €100 ระบบจะบันทึก Conversion 1 รายการพร้อมกับมูลค่าทางการเงินนั้น วิธีการนับนี้มีไว้สำหรับกิจกรรมธุรกรรมที่สร้างใน Search Ads 360
    • ``9
      ตัวแปร Floodlight ที่กำหนดเองจะยอมรับทุกค่าที่คุณเลือกส่งไปให้ ค่าเหล่านี้ใช้เป็นเมตริกหรือมิติข้อมูลและกลุ่มใน Search Ads 360 ได้ คุณต้องไม่ส่งข้อมูลที่ Search Ads 360 นำไปใช้หรือทราบว่าเป็นข้อมูลส่วนบุคคลที่ระบุตัวบุคคลนั้นได้

ช่องที่กำหนดเองในข้อมูลโค้ดเหตุการณ์

You can insert custom data into event snippets with the `<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

`0 field.

This field accepts any values you want to pass to Google Marketing Platform. You must not pass any data that Google Marketing Platform could use or recognize as personally-identifiable information. Here are some common fields you may want to use with `<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

`0 field:

Field name Value format Counting method Description`<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

2 Number All The Google tag will automatically handle cache busting for you. If you choose to override this and control cache busting manually, you can use the <! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

2 field. Add a value to the <! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

2 field based on the tag type and counting method the same way you would for an iframe tag.<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

5 Number Counter - unique The Google tag will automatically handle cache busting for you. If you choose to override this and control cache busting manually, you can use the <! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

5 field. Add a value to the <! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

5 field the same way you would for an iframe tag.<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

8 0 or 1 All This field applies to tags on mobile devices. It accepts a value of 0 or 1. A value of 1 means that the user has enabled the “Limit Ad Tracking” option for IDFA or AdID in order to opt out of interest-based ads and remarketing. If "Limit Ad Tracking" is off, the value is 0. If missing or unpopulated, this field will default to 0.<! Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick > <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

`9 0 or 1 All This field applies to tags on mobile devices. It accepts a value of 0 or 1. A value of 1 indicates that this particular request may come from a user under the age of 13, under COPPA compliance.`src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID"`0 0 or 1 All It accepts a value of 0 or 1. A value of 1 indicates that this particular request may come from a user under the age of 16 (may differ by country), under compliance with the EU’s General Data Protection Regulation (GDPR) or other regulations.`src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID"`1 0 or 1 All It accepts a value of 0 or 1. A value of 1 indicates that this particular request may come from a user who wishes to opt-out of remarketing. If missing or unpopulated, this field will default to 0.`src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID"`2 string all

A unique advertiser created identifier (passed via Floodlight) that can be synced with Google to attribute offline conversions.

  • Match ID has a limit of 100 characters and is case sensitive.
  • Match ID can only contain letters, numbers, underscores, hyphens and periods.

Example event snippet with the `<!--

Start of global snippet: Please do not remove Place this snippet between the <head> and </head> tags on every page of your site. > <! Google tag (gtag.js) - DoubleClick --> <script async src="https://www.googletagmanager.com/gtag/js?id=DC-1234567"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date());

gtag('config', 'DC-1234567'); </script> <! End of global snippet: Please do not remove >

`0 field

`src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID"`4

ส่วน ของข้อมูลโค้ดเหตุการณ์

Event snippets generated by Search Ads 360 include an optional `src="https://www.googletagmanager.com/gtag/js?id=DCM_FLOODLIGHT_CONFIG_ID"`5 tag that contains a Floodlight image tag. This tag is used to report conversions in browsers that don't support JavaScript. If you use Floodlight iframe or image tags, we recommend you migrate to the Google tag or use Google Tag Manager with the Conversion Linker to measure conversions more accurately and benefit from the latest dynamic features and integrations as they become available.

ข้อมูลเพิ่มเติมสำหรับนักพัฒนาเว็บไซต์

ดูข้อมูลเพิ่มเติมเกี่ยวกับการเพิ่มแท็ก Google (gtag) ลงในเว็บไซต์ได้ที่คู่มือนักพัฒนาซอฟต์แวร์ gtag.js