دليل أسلوب النماذج
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تم إعداد دليل الأنماط هذا لمساعدتك في اتخاذ قرارات بشأن كيفية إعداد النماذج لمعرض نماذج المنتدى. يستند دليل الأنماط هذا إلى مبادئ الكتابة في أسلوب Material Design من Google. ببساطة، تشمل هذه الخطوات ما يلي:
- كن موجزًا
- الكتابة بأسلوب بسيط ومباشر
- مخاطبة المستخدمين بوضوح
- إرسال التفاصيل الأساسية
- الكتابة لجميع مستويات القراءة
- الكتابة بطريقة تناسب البشر، وليس الروبوتات
اتّبِع هذه الإرشادات للمساعدة في ضمان أنّ جميع النماذج لها مظهر وأسلوب متّسقان، ولمساعدة المستخدمين في فهم كيفية استخدام النموذج.
معلومات
تنطبق هذه الإرشادات على العناصر المتوفّرة في علامة التبويب المعلومات في "أداة إنشاء النماذج".
الاسم
يتم عرض اسم النموذج لمستخدمي أداة "إدارة العلامات من Google" في واجهة مستخدم أداة "إدارة العلامات من Google" وفي "معرض النماذج الخاص بالمنتدى". يظهر هذا الرمز في أعلى صفحة تفاصيل النموذج، كما يظهر عند إدراج النماذج.
- استخدِم اسم شركتك/مؤسستك والاسم الوظيفي للنموذج: اسم المؤسسة اسم النموذج.
- استخدِم حالة أحرف العنوان.
- استخدِم عبارات توضّح الوظيفة.
- تجنَّب استخدام العبارة "رسمي" في أسماء النماذج، ما لم تكن مفوَّضًا بذلك من قِبل المؤسسة المعنية.
أمثلة: علامة قياس الإحالات الناجحة في MyCompany، متغيّر رقم تعريف حملة MyCompany
الوصف
وصف النموذج هو وصف للنموذج يظهر في الصفحات التفصيلية كملخّص موجز لوظيفة النموذج.
- استخدِم جملاً واضحة وموجزة لوصف ما يفعله النموذج.
- حدِّد بوضوح فوائد النموذج للمستخدم. على سبيل المثال: "يمكن أن يساعدك نموذج "أداة إنشاء الجمهور" على Example.com في إنشاء قوائم جمهور جديدة من زوّار الموقع الإلكتروني".
- تجنَّب استخدام مصطلحات فنية.
- أدرِج روابط تؤدي إلى معلومات إضافية ومستندات ودعم.
الرمز
يتم تمثيل رمز النموذج كصورة مصغّرة عند إدراجه في "إدارة العلامات من Google" وفي "معرض نماذج المنتدى".
- استخدِم تنسيق PNG أو JPEG أو GIF للصورة.
- يجب أن تكون الصورة مربّعة، وأن لا تقلّ عن 48 بكسل في 48 بكسل، وألا تزيد عن 96 بكسل في 96 بكسل.
- يجب أن يكون حجم الملف أقل من 50 كيلوبايت.
- تجنَّب استخدام شعارات الشركات الرسمية ما لم تحصل على إذن من المؤسسة المعنية بذلك.
- الحقول
- استخدِم علامة التبويب "الحقول" في "أداة إنشاء النماذج" لإضافة عناصر النموذج، مثل إدخال النص ومربّعات الاختيار وما إلى ذلك.
الحقول
تنطبق إرشادات الأنماط هذه على علامة التبويب الحقول في "أداة إنشاء النماذج".
اسم المعلَمة
هذا هو اسم الحقل كما يظهر في "محرر النماذج"، وليس كما يظهر للمستخدم. يجب أن تكون الأسماء وصفية لنوع البيانات المستخدَمة. اضبط تنسيق أسماء المَعلمات على lowerCamelCase
. أمثلة: userName، وcustomerID، وshoppingCartValue.
تصنيفات الحقول
تشمل تصنيفات الحقول حقول الأسماء المعروضة ونصوص مربّعات الاختيار والعناصر ذات الصلة.
- استخدِم حالة أحرف الجملة.
- وكلما كان المحتوى أقصر، كان ذلك أفضل.
- استخدم عبارات وصفية.
- استخدِم كلمات شائعة.
نص المساعدة
نص المساعدة هو محتوى معلوماتي، يظهر كنصائح، لمساعدة المستخدم في إدخال قيمة صالحة في حقل النموذج. قدِّم مثالاً على الإدخال، إن أمكن، ووصِف كيفية استخدام حقل النموذج أو تأثير تقديم قيم معيّنة.
- استخدِم حالة أحرف الجملة.
- كن موجزًا ولكن عبِّر عن مشاعرك. لا بأس من استخدام الكلمات المختصرة والكتابة بأسلوب الشخص الثاني (أنت).
- أنواع الحقول المتوافقة
- يُسمح بتنسيق HTML الأساسي. أمثلة:
<strong>
و<em>
أنواع الحقول المتوافقة
النوع |
الوصف |
إدخال نص |
إدخال نص ستكون قيمة مَعلمة النموذج من هذا النوع سلسلة قد تشير إلى متغيّرات. يمكن أن تكون الأداة المصغّرة لإدخال النص المعروضة في واجهة مستخدم "إدارة العلامات من Google" إما حقل نص من سطر واحد أو إدخال من عدة أسطر. |
القائمة المنسدلة |
قائمة منسدلة يمكن فيها اختيار عنصر واحد فقط كقيمة لمَعلمة النموذج. اعرض العناصر أبجديًا ما لم يكن لديك سبب وجيه لترتيبها بطريقة أخرى. |
مربّع الاختيار |
إدخال مربّع اختيار ستكون قيمة مَعلمة النموذج من هذا النوع منطقية: صحيحة إذا تم وضع علامة في المربّع، وخطأ إذا لم يتم وضع علامة. |
زر الاختيار |
إدخال الراديو تعرِض مَعلمة النموذج من هذا النوع قائمة بالخيارات في واجهة مستخدِم "مدير العلامات من Google"، ولا يُسمح للمستخدِم إلا باختيار أحد الخيارات كقيمة لمَعلمة النموذج. |
جدول بسيط |
إدخال جدول بسيط يمكن تعديل كل خلية في الجدول في مكانها، ولا يمكن أن تكون كل خلية إلا من نوعَين: إدخال نص أو قائمة منسدلة. قيمة مَعلمة النموذج من هذا النوع هي مصفوفة من العناصر: يُشفِّر كل عنصر صفًا، ويجب أن يكون كل مفتاح في العنصر أحد أسماء الأعمدة، وتكون كل قيمة في العنصر هي قيمة الخلية المقابلة. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis style guide helps you create templates for the Community Template Gallery, ensuring consistency and user-friendliness by adhering to Google Material Design writing principles.\u003c/p\u003e\n"],["\u003cp\u003eWhen naming your template, use your organization's name, a descriptive functional name in Title Case, and avoid using "Official" unless authorized.\u003c/p\u003e\n"],["\u003cp\u003eTemplate descriptions should clearly explain the template's function, benefits, and any supporting resources using concise language and avoiding jargon.\u003c/p\u003e\n"],["\u003cp\u003eTemplate icons must be square images (PNG, JPEG, or GIF) between 48px and 96px in size, under 50 kilobytes, and avoid using official logos without authorization.\u003c/p\u003e\n"],["\u003cp\u003eFor template fields, use descriptive parameter names in lowerCamelCase, concise and clear field labels in sentence case, and helpful tooltips written in a human-friendly tone.\u003c/p\u003e\n"]]],["Template guidelines for the Community Template Gallery include creating descriptive names using \"Organization Name Template Name\" in Title Case, clear descriptions detailing template functionality and user benefits, and square icons (48-96px, under 50KB). In the Fields tab, parameter names should be `lowerCamelCase`, field labels in sentence case, and concise, human-readable help text. Supported field types are text input, drop-down menu, checkbox, radio button, and simple table, with specific formatting rules.\n"],null,["# Template style guide\n\nThis style guide has been prepared to help you make decisions on how to prepare templates for the [Community Template Gallery](https://support.google.com/tagmanager/answer/9454109). This style guide is based on the [Google Material Design writing principles](https://material.io/design/communication/writing.html#principles). Simply put, these are:\n\n- Be concise\n- Write simply and directly\n- Address users clearly\n- Communicate essential details\n- Write for all reading levels\n- Be human: write for humans, not robots\n\nFollow these guidelines to help ensure that all templates have a consistent look and feel, and to help users understand how to use your template.\n\nInfo\n----\n\nThese guidelines apply to items found in the Template Editor's **Info** tab.\n\n### Name\n\nThe template name is presented to Tag Manager users throughout the Tag Manager user interface and Community Template Gallery. It appears at the top of a template's detail page, and appears when templates are listed.\n\n- Use your company/organization name and the functional name of the template: *Organization Name* *Template Name*.\n- Use Title Case.\n- Use terms that are descriptive of the functionality.\n- Avoid use of the term \"Official\" in template names, unless you are authorized to do so by the relevant organization.\n\n**Examples:** *MyCompany Conversion Measurement Tag, MyCompany Campaign ID Variable*\n\n### Description\n\nThe template description is a description of the template that appears on detail pages as a brief summary of the template functionality.\n\n- Use clear and concise sentences to describe what the template does.\n- Clearly state how your template benefits the user. For example: \"The Example.com Audience Builder template can help you build new audience lists from website visitors.\"\n- Avoid jargon.\n- Include links for additional information, documentation, and support.\n\n### Icon\n\nYour template icon is represented as a thumbnail when listed in Tag Manager and on the Community Template Gallery.\n\n- Use PNG, JPEG, or GIF for the image format.\n- Image should be square, at least 48px by 48px, and no larger than 96px by 96px.\n- File size must be less than 50 kilobytes.\n- Avoid use of official company logos, unless you are authorized to do so by the relevant organization.\n- Fields\n- Use the Template Editor's Fields tab to add form elements such as text input, checkboxes, etc.\n\nFields\n------\n\nThese style guidelines apply to the Template Editor's **Fields** tab.\n\n### Parameter name\n\nThis is the name of the field as it appears in the Template Editor, but not as it appears to the user. Names should be descriptive of the type of data used. Format parameter names as `lowerCamelCase`. **Examples:** *userName, customerID, shoppingCartValue*.\n\n### Field labels\n\nField labels include display name fields, checkbox text, and related items.\n\n- Use sentence case.\n- Shorter is better.\n- Be descriptive.\n- Use common words.\n\nHelp text\n---------\n\nHelp text is informational content, shown as a tooltip, to help the user enter a valid value into the template field. Provide example input, if possible, and describe how the template field is used or the effect of providing certain values.\n\n- Use sentence case.\n- Be concise, but be human. It's okay to use contractions and write in the 2nd person (you).\n- Supported field types\n- Basic HTML formatting is permitted. Examples: *`\u003cstrong\u003e`, `\u003cem\u003e`*.\n\nSupported field types\n---------------------\n\n| Type | Description |\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Text input** | Text input. The value of a template parameter of this type will be a string that may refer to variables. The text input widget rendered in the Tag Manager user interface could be either a single-line text field or a multi-line input. |\n| **Drop-down menu** | Drop-down menu in which only a single item could be selected as the value of the template parameter. List items in alphabetical order unless there is a good reason to do otherwise. |\n| **Checkbox** | Checkbox input. The value of a template parameter of this type will be boolean: true for checked, false for unchecked. |\n| **Radio button** | Radio input. A template parameter of this type presents a list of choices in the Tag Manager user interface and the user is only allowed to pick one of the choices as the value of the template parameter. |\n| **Simple table** | A simple table input. Each cell in the table can be edited in place, and each cell can only be of two types: a text input or a drop-down menu. The value of a template parameter of this type is an array of objects: each object encodes a row, each key in the object must be one of the column names, and each value in the object is the value of the corresponding cell. |"]]