مقدمه ای بر برچسب گذاری و تگ گوگل
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
تگ کردن فرآیند اضافه کردن قطعه کد (به نام برچسب) به هر صفحه از وب سایت شما است تا بتوانید در مورد افرادی که از سایت شما بازدید می کنند و نحوه تعامل آنها با آن اطلاعات کسب کنید.
برچسبگذاری بخشی جدایی ناپذیر از بسیاری از محصولات اندازهگیری، از جمله Google Ads، Google Analytics و بسیاری از محصولات شخص ثالث است.
چه بخواهید درباره محبوبترین پستهای وبلاگ، مؤثرترین صفحات فرود یا محبوبترین محصولات خود بدانید، دادههایی که از طریق برچسبگذاری جمعآوری میکنید به شما امکان میدهد درباره سایت و استراتژیهای بازاریابی خود تصمیمات آگاهانهتری بگیرید.
با تگ گوگل شروع کنید
تگ گوگل یک تکه کد است که می توانید آن را در گوگل ادز، گوگل آنالیتیکس و سایر محصولات مشابه گوگل بیابید. به جای مدیریت چندین تگ برای حساب های مختلف محصولات گوگل، می توانید از تگ گوگل در کل وب سایت خود استفاده کنید و تگ را به چندین مقصد متصل کنید.
تگ گوگل را تنظیم کنید
تنظیم تگ گوگل به نحوه راه اندازی سایت شما و نحوه تغییر کد بستگی دارد. شما می توانید تگ گوگل را به یکی از روش های زیر در سایت خود پیاده سازی کنید:
گوگل تگ منیجر : یک سیستم مدیریت برچسب که به شما امکان می دهد بدون تغییر کد، برچسب ها را در سایت خود تنظیم و مدیریت کنید. برای استفاده از Tag Manager، 2 قطعه کد را به هر صفحه از وب سایت خود اضافه می کنید. بعد از اینکه قطعه ها را به کد خود اضافه کردید، پس از آن نیازی به تغییر کد خود ندارید. در عوض، می توانید برچسب های خود را از طریق وب سایت Tag Manager تنظیم و مدیریت کنید.
gtag.js : یک چارچوب جاوا اسکریپت که به شما امکان می دهد داده ها را از سایت خود به محصولات اندازه گیری Google ارسال کنید. برای راه اندازی gtag.js، 1 قطعه کد را به هر صفحه سایت خود اضافه می کنید. برای استفاده مؤثر از gtag.js، باید راحت جاوا اسکریپت را در سایت خود تغییر دهید.
اگر از سازنده وب سایت یا سیستم مدیریت محتوا مانند Shopify، Wix یا Wordpress استفاده می کنید، سازنده وب سایت یا سیستم مدیریت محتوا ممکن است یکپارچه سازی برای راه اندازی Tag Manager یا gtag.js در سایت شما ارائه دهد.
برای تنظیم برچسب های اندازه گیری و تبلیغات در یک برنامه تلفن همراه، از Google Analytics برای Firebase SDK استفاده کنید. سپس، شما همچنین می توانید از Tag Manager برای تغییر و مسیریابی داده ها در برنامه تلفن همراه استفاده کنید.
مراحل بعدی
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eTagging involves adding code snippets to web pages to gather data on visitor behavior and site performance.\u003c/p\u003e\n"],["\u003cp\u003eThe Google tag streamlines tag management, allowing connection to multiple Google products with a single code snippet.\u003c/p\u003e\n"],["\u003cp\u003eImplementing tags can be done through Google Tag Manager or gtag.js, offering varying levels of coding involvement.\u003c/p\u003e\n"],["\u003cp\u003eWebsite builders and content management systems often provide integrations for simplified tag setup.\u003c/p\u003e\n"],["\u003cp\u003eMobile app tagging utilizes the Google Analytics for Firebase SDK and can be managed through Tag Manager.\u003c/p\u003e\n"]]],["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"],null,["# Introduction to tagging and the Google tag\n\nTagging is the process of adding snippets of code (called tags) to each page of\nyour website so you can learn about the people who visit your site and how they\ninteract with it.\n\nTagging is an integral part of many measurement products, including Google Ads,\nGoogle Analytics, and many third-party products too.\n\nWhether you want to know about your most popular blog posts, most effective\nlanding pages, or most popular products, the data you'll collect through tagging\nlets you make more informed decisions about your site and your marketing\nstrategies.\n\nGet started with the Google tag\n-------------------------------\n\nThe Google tag is a single piece of code that you can find in Google Ads, Google\nAnalytics, and other similar Google products. Instead of managing multiple tags\nfor different Google product accounts, you can use the Google tag across your\nentire website and connect the tag to multiple destinations.\n\nSet up the Google tag\n---------------------\n\nSetting up the Google tag depends on how your site is set up and how you can\nchange the code. You can implement the Google tag on your site in one of the\nfollowing ways:\n\n- **Google Tag Manager**: A tag management system that lets you set up and\n manage tags on your site without changing your code. To use Tag Manager, you\n add 2 snippets of code to each page of your website. After you add the\n snippets to your code, you don't need to change your code much after that;\n instead, you can set up and manage your tags through the Tag Manager website.\n\n- **gtag.js**: A JavaScript framework that lets you send data from your site to\n Google measurement products. To set up gtag.js, you add 1 snippet of code to\n each page of your site. To use gtag.js effectively, you need to be comfortable\n changing JavaScript on your site.\n\nIf you use a website builder or content management system like Shopify, Wix, or\nWordpress, the website builder or content management system may offer an\nintegration for setting up Tag Manager or gtag.js on your site.\n\nTo set up measurement and advertising tags in a mobile app,\nuse the Google Analytics for Firebase SDK. Then, you can also\nuse Tag Manager to modify and route data in the mobile app.\n\nNext steps\n----------\n\n- [Plan your tag setup](/tag-platform/devguides/prerequisites)\n- Set up the Google tag with:\n - [Tag Manager](https://support.google.com/tagmanager/answer/6102821)\n - [gtag.js](/tag-platform/gtagjs/install)\n - [a website builder or CMS](https://support.google.com/tagmanager/answer/12403447)\n - [the Google Analytics for Firebase SDK](https://firebase.google.com/docs/analytics)"]]