您只需为自己的网站添加一种或多种代码,即可开始在 Google Analytics(分析)和 Google Ads 转化衡量等衡量及广告产品中收集数据。您可以使用 Google 代码 (gtag.js)(需要更改 JavaScript 代码)或 Google 跟踪代码管理器等跟踪代码管理系统(需要在代码管理系统中更改配置)来添加代码。
如果您要在移动应用中部署衡量代码和广告代码,则可以使用 Google Analytics for Firebase SDK。部署 SDK 后,您还可以使用 Google 跟踪代码管理器来修改和以路由方式发送数据。
<script> window.dataLayer = window.dataLayer ||[]; function gtag(){dataLayer.push(arguments);} gtag('js',newDate());
gtag('config','TAG_ID'); </script>
如需使用跟踪代码管理器为 Google Analytics(分析)和 Google Ads 启用衡量功能,您需要为 Google Analytics(分析)和 Google Ads 转化分别创建代码,然后将其配置为在同一触发器上触发。发布容器后,您可以立即在网站上看到更改。如需了解详情,请参阅 Google Ads 转化。
[null,null,["最后更新时间 (UTC):2024-02-06。"],[[["Tagging involves adding code snippets to web pages to gather data on visitor behavior and site performance."],["The Google tag streamlines tag management, allowing connection to multiple Google products with a single code snippet."],["Implementing tags can be done through Google Tag Manager or gtag.js, offering varying levels of coding involvement."],["Website builders and content management systems often provide integrations for simplified tag setup."],["Mobile app tagging utilizes the Google Analytics for Firebase SDK and can be managed through Tag Manager."]]],["Tagging involves adding code snippets to website pages to track user behavior and gain insights for informed decision-making. The Google tag, a unified code snippet, can be implemented across a website and connected to multiple Google products. Implementation methods include Google Tag Manager, which requires two code snippets and allows tag management without coding, and gtag.js, requiring one code snippet and JavaScript proficiency. Website builders and the Firebase SDK offer integrations for simplified implementation.\n"]]