با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
ویژگی های کاربر بخش هایی از پایگاه کاربر شما را توصیف می کند، مانند ترجیح زبان یا موقعیت جغرافیایی. Analytics به طور خودکار برخی از ویژگی های کاربر را ثبت می کند . اگر می خواهید ویژگی های اضافی را جمع آوری کنید، می توانید تا 25 ویژگی کاربر اضافی را در هر پروژه تنظیم کنید. برای آشنایی با نحوه تنظیم و ثبت مشخصات کاربر، به ویژگی های کاربر سفارشی مراجعه کنید.
ویژگی های کاربر تقسیم بندی کاربر را افزایش می دهد، اما داده های دارایی کاربر اغلب فقط در سمت سرور در دسترس است. پروتکل اندازه گیری به شما امکان می دهد اندازه گیری های سمت سرویس گیرنده را با داده های سمت سرور افزایش دهید، که معمولاً تنها با استفاده از راه حل های سمت مشتری غیر ممکن است.
اسامی رزرو شده
برخی از نامهای دارایی کاربر رزرو شدهاند و نمیتوانند در اندازهگیریها استفاده شوند:
first_open_time
first_visit_time
last_deep_link_referrer
user_id
first_open_after_install
علاوه بر این، نام ویژگی های کاربر نمی تواند با:
google_
ga_
firebase_
مثال استفاده
در مثال زیر، CRM شما دارای یک ویژگی کاربر ( customer_tier ) است که میخواهید به اندازهگیریهای خود اضافه کنید. customer_tier می توان روی یکی از premium یا standard تنظیم کرد. برای دریافت این ویژگی کاربر در گزارش های خود، باید موارد زیر را انجام دهید:
ابتدا، از مشتری بخواهید یک رویداد add_payment_info را همراه با یک تماس با API سروری که به سیستم CRM شما دسترسی دارد ارسال کند:
کد مشتری
سپس سرور شما با استفاده از پروتکل اندازهگیری، اندازهگیری را با ویژگی کاربر customer_tier افزایش میدهد:
کد سرور
این ویژگی کاربر دو بخش premium و standard را گزارش می کند.
برای جزئیات کامل نحوه ارسال رویدادها با استفاده از پروتکل اندازه گیری ، به ارسال رویدادها مراجعه کنید.
لغو مهر زمانی
پروتکل اندازه گیری از اولین مهر زمانی که در لیست زیر پیدا می کند برای هر ویژگی کاربر در درخواست استفاده می کند:
timestamp_micros ورودی در user_properties .
timestamp_micros درخواست.
زمانی که پروتکل اندازه گیری درخواست را دریافت می کند.
مثال زیر یک مهر زمانی در سطح درخواست ارسال میکند که برای همه ویژگیهای کاربر در درخواست اعمال میشود. در نتیجه، پروتکل اندازه گیری به هر دو ویژگی کاربر customer_tier و customer_group یک مهر زمانی از requestUnixEpochTimeInMicros اختصاص می دهد.
مثال زیر هم یک مهر زمانی در سطح درخواست و هم یک مهر زمانی برای ویژگی کاربر customer_tier ارسال می کند. در نتیجه، پروتکل اندازه گیری به customer_tier یک مهر زمانی از customerTierUnixEpochTimeInMicros و customer_group یک مهر زمانی از requestUnixEpochTimeInMicros اختصاص می دهد.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eUser properties are attributes that describe segments of your user base, like language or location, and you can set up to 25 custom ones.\u003c/p\u003e\n"],["\u003cp\u003eThe Measurement Protocol allows you to combine server-side data with client-side measurements to enhance user property data.\u003c/p\u003e\n"],["\u003cp\u003eCertain user property names are reserved and cannot be used, including ones that start with \u003ccode\u003egoogle_\u003c/code\u003e, \u003ccode\u003ega_\u003c/code\u003e, or \u003ccode\u003efirebase_\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can send user properties with events or in separate requests to enrich your Analytics data.\u003c/p\u003e\n"],["\u003cp\u003eTimestamps for user properties can be overridden at the request level or individually for specific properties to ensure data accuracy.\u003c/p\u003e\n"]]],["User properties segment users based on characteristics like language or location, with up to 25 custom properties per project. The Measurement Protocol enriches client-side data with server-side insights, improving segmentation. Reserved property names and prefixes cannot be used. Server code can augment client events with user properties like `customer_tier`. Timestamps for properties are prioritized from individual entries to request level, and the most recent property value is used. Overriding timestamps is crucial for historical data.\n"],null,["# Send user properties\n\nUser properties describe segments of your user base, such as language preference\nor geographic location. Analytics [automatically logs some user properties](https://support.google.com/analytics/answer/9268042). If\nyou want to collect additional properties, you can set up to 25 additional user\nproperties per project. See [Custom user properties](https://support.google.com/analytics/answer/9269570) to learn how to set and\nregister user properties.\n\nUser properties enhance user segmentation, but user property data is often only\navailable server-side. The Measurement Protocol lets you augment\nclient-side measurements with server-side data, which is typically infeasible\nusing only client-side solutions.\n\nReserved names\n--------------\n\nSome user property names are reserved and cannot be used in measurements:\n\n- `first_open_time`\n- `first_visit_time`\n- `last_deep_link_referrer`\n- `user_id`\n- `first_open_after_install`\n\nAdditionally, user property names cannot begin with:\n\n- `google_`\n- `ga_`\n- `firebase_`\n\nExample usage\n-------------\n\nFirebase gtag.js\n\nIn the following example, your CRM has a user property (`customer_tier`) you\nwould like to add to your measurements. `customer_tier` can be set to one of\n`premium` or `standard`. To get this user property in your reports, you would do\nthe following:\n\nFirst, have the client send an [`add_payment_info`](/analytics/devguides/collection/protocol/ga4/reference/events#add_payment_info) event along with a call to a\nserver API that has access to your CRM system:\n\n**client code**\n\nYour server then augments the measurement with the `customer_tier` user property\nusing the Measurement Protocol:\n\n**server code**\n| **Tip:** This sample shows how to send a user property along with an event. You can also send a request that *only* contains user properties, without any events.\n\nThis user property reports the two segments `premium` and `standard`.\n| **Key Point:** User properties can improve segmentation using data that's only available server-side through use of the Measurement Protocol.\n\nSee [Sending events](/analytics/devguides/collection/protocol/ga4/sending-events) for full details on how to send events using the\nMeasurement Protocol.\n\nOverride timestamp\n------------------\n\nThe Measurement Protocol uses the *first* timestamp it finds in the following\nlist for each user property in the request:\n\n1. The `timestamp_micros` of the entry in `user_properties`.\n2. The `timestamp_micros` of the request.\n3. The time that the Measurement Protocol receives the request.\n\nThe following example sends a request-level timestamp that applies to all of\nthe user properties in the request. As a result, the Measurement Protocol assigns\nboth the `customer_tier` and `customer_group` user properties a timestamp of\n`requestUnixEpochTimeInMicros`. \n\n {\n \"timestamp_micros\": requestUnixEpochTimeInMicros,\n \"user_properties\": {\n \"customer_tier\": {\n \"value\": customerTierValue\n },\n \"customer_group\": {\n \"value\": customerGroupValue\n }\n }\n }\n\nThe following example sends both a request-level timestamp and a timestamp for\nthe `customer_tier` user property. As a result, the Measurement Protocol assigns\nthe `customer_tier` a timestamp of `customerTierUnixEpochTimeInMicros`, and the\n`customer_group` a timestamp of `requestUnixEpochTimeInMicros`. \n\n \"timestamp_micros\": requestUnixEpochTimeInMicros,\n \"user_properties\": {\n \"customer_tier\": {\n \"value\": customerTierValue,\n \"timestamp_micros\": customerTierUnixEpochTimeInMicros\n },\n \"customer_group\": {\n \"value\": customerGroupValue\n }\n }\n\n| **Tip:** Google Analytics uses the most recent value of a user property for each user. If you're sending user property changes that occurred in the past, override the timestamp to ensure that the user properties from Measurement Protocol don't override more recent changes from tagging or the Firebase SDK."]]