با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
شناسههای کاربری، شناسههای منحصربهفرد شما هستند که به تک تک کاربران اختصاص میدهید. این راهنما نحوه ارسال شناسههای کاربری به Google Analytics را توضیح میدهد تا بتوانید رفتار کاربر را در جلسات، دستگاهها و پلتفرمهای مختلف مرتبط کنید.
تنظیم ابعاد سفارشی بر اساس شناسه های کاربر منجر به ابعادی با مقادیر منحصر به فرد بسیار زیادی می شود. داشتن مقادیر بیش از حد منحصر به فرد باعث ایجاد مشکلاتی با داده های Google Analytics و دقت گزارش می شود. درباره بهترین روشها برای تنظیم ابعاد سفارشی بیشتر بیاموزید .
قبل از شروع
قبل از اینکه بتوانید شناسه های کاربری را ارسال کنید، مطمئن شوید که موارد زیر را تکمیل کرده اید:
تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-14 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eUser IDs, assigned by you, enable tracking user behavior across sessions, devices, and platforms in Google Analytics.\u003c/p\u003e\n"],["\u003cp\u003eTo send user IDs to Google Analytics, ensure you have a Google Analytics account, a web data stream, and the Editor role or higher.\u003c/p\u003e\n"],["\u003cp\u003eAvoid setting custom dimensions based on user IDs and sending user IDs when a user isn't signed in to maintain data accuracy.\u003c/p\u003e\n"],["\u003cp\u003eBefore implementing user IDs, review the best practices and guides linked in the document to avoid potential issues.\u003c/p\u003e\n"]]],["User IDs are unique identifiers assigned to users to track their behavior across sessions, devices, and platforms within Google Analytics. To ensure data accuracy, avoid using user IDs for custom dimensions and only send them when users are signed in; do not set placeholder values. Before sending user IDs, establish a Google Analytics account and web data stream, and ensure the Editor role is assigned.\n"],null,["# Send user IDs\n\nUser IDs are your own unique identifiers that you assign to individual users.\nThis guide explains how to send user IDs to Google Analytics, so you can connect\nuser behavior across different sessions, devices, and platforms.\n\nTo learn more about the User-ID feature, see [Measure\nactivity across platforms](//support.google.com/analytics/answer/9213390). To learn how to set a user ID for an app, see [Set a\nuser ID](//firebase.google.com/docs/analytics/userid).\n| **Warning:** Don't set custom dimensions based on user IDs.\n\nSetting custom dimensions based on user IDs leads to dimensions with too many\nunique values. Having too many unique values causes issues with Google\nAnalytics data and reporting accuracy. [Learn more about best practices for\nsetting custom\ndimensions](//support.google.com/analytics/answer/14240153#best-practices).\n\n\u003cbr /\u003e\n\n\ngtag.js Tag Manager\n\nBefore you begin\n----------------\n\nBefore you can send user IDs, make sure you've completed the following:\n\n- [Create a Google Analytics account and property](https://support.google.com/analytics/answer/9304153#account).\n- [Create a web data stream for your website](https://support.google.com/analytics/answer/9304153#stream&zippy=%2Cweb).\n- Have the [Editor](https://support.google.com/analytics/answer/9305587) role (or above) to the Google Analytics account.\n\nSend user IDs\n-------------\n\nThe value you send for `user_id` depends on the state of\nthe user:\n\n- **User has never signed in** : Don't send the `user_id` parameter.\n- **User is signed-in**: Send their user ID.\n- **User was signed-in, then signed out** : Send `null`."]]