מדריך הסגנון של התבניות
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מדריך הסגנון הזה נועד לעזור לכם להחליט איך להכין תבניות לגלריית התבניות של הקהילה. מדריך הסגנון הזה מבוסס על עקרונות הכתיבה של Google Material Design. במילים פשוטות, אלה:
- השם צריך להיות תמציתי
- כותבים בצורה פשוטה ופשוטה
- פנייה למשתמשים בצורה ברורה
- העברת פרטים חיוניים
- כתיבה לכל רמות הקריאה
- כותבים בצורה אנושית: כותבים לאנשים, לא לרובוטים
מומלץ לפעול לפי ההנחיות הבאות כדי לוודא שלכל התבניות יש מראה ותחושה עקביים, וכדי לעזור למשתמשים להבין איך להשתמש בתבנית.
מידע
ההנחיות האלה חלות על פריטים שמופיעים בכרטיסייה מידע של עורך התבניות.
שם
שם התבנית מוצג למשתמשים ב-Tag Manager בממשק המשתמש של Tag Manager ובגלריית התבניות לקהילות. הוא מופיע בחלק העליון של דף הפרטים של התבנית, וגם כשמוצגות רשימות של תבניות.
- כותבים את שם החברה או הארגון ואת השם הפונקציונלי של התבנית: שם הארגון שם התבנית.
- שימוש באותיות רישיות בתחילת כל מילה.
- השתמשו במונחים שמתארים את הפונקציונליות.
- מומלץ להימנע משימוש במונח 'רשמי' בשמות של תבניות, אלא אם קיבלתם הרשאה לעשות זאת מהארגון הרלוונטי.
דוגמאות: MyCompany Conversion Measurement Tag, MyCompany Campaign ID Variable
תיאור
תיאור התבנית הוא תיאור של התבנית שמופיע בדפי פרטים כסיכום קצר של הפונקציונליות של התבנית.
- כדאי להשתמש במשפטים ברורים ותמציתיים כדי לתאר את הפעולות שהתבנית מבצעת.
- צריך לציין בבירור איך התבנית תורמת למשתמש. לדוגמה: "התבנית של הכלי ליצירת קהלים ב-Example.com יכולה לעזור לכם ליצור רשימות קהלים חדשות ממבקרים באתר".
- הימנעו משימוש בשפה מקצועית.
- מומלץ לכלול קישורים למידע נוסף, למסמכי תיעוד ולתמיכה.
סמל
סמל התבנית מיוצג כתמונה ממוזערת כשהיא מופיעה ב-Tag Manager ובגלריית התבניות של הקהילה.
- הפורמט של התמונה צריך להיות PNG, JPEG או GIF.
- התמונה צריכה להיות ריבועית, בגודל של 48 על 48 פיקסלים לפחות, ולא יותר מ-96 על 96 פיקסלים.
- גודל הקובץ צריך להיות קטן מ-50KB.
- הימנעו משימוש בסמלי לוגו רשמיים של חברות, אלא אם קיבלתם הרשאה לעשות זאת מהארגון הרלוונטי.
- שדות
- בכרטיסייה 'שדות' של עורך התבניות, אפשר להוסיף רכיבי טופס כמו קלט טקסט, תיבות סימון וכו'.
שדות
הנחיות הסגנון האלה חלות על הכרטיסייה שדות בעורך התבניות.
שם הפרמטר
זהו השם של השדה כפי שהוא מופיע בעורך התבניות, אבל לא כפי שהוא מופיע למשתמש. השמות צריכים לתאר את סוג הנתונים שבהם נעשה שימוש. הפורמט של שמות הפרמטרים הוא lowerCamelCase
. דוגמאות: userName, customerID, shoppingCartValue.
תוויות שדות
תוויות השדות כוללות שדות של שמות מוצגים, טקסט של תיבות סימון ופריטים קשורים.
- מכילה אות גדולה בתחילת המשפט (באנגלית).
- קצר יותר הוא טוב יותר.
- השתמשו בתיאורים בחוכמה.
- להשתמש במילים נפוצות.
טקסט עזרה
טקסט עזרה הוא תוכן מידע שמוצג ככלי עזר, כדי לעזור למשתמש להזין ערך תקף בשדה התבנית. אם אפשר, כדאי לספק דוגמה לקלט ולתאר את אופן השימוש בשדה התבנית או את ההשפעה של מתן ערכים מסוימים.
- מכילה אות גדולה בתחילת המשפט (באנגלית).
- השם צריך להיות תמציתי, אבל גם אנושי. מותר להשתמש בקיצור מילים ולכתוב בלשון פנייה שנייה (את/ה).
- סוגי השדות הנתמכים
- מותר להשתמש בפורמט HTML בסיסי. דוגמאות:
<strong>
, <em>
.
סוגי השדות הנתמכים
סוג |
תיאור |
קלט טקסט |
קלט טקסט. הערך של פרמטר תבנית מהסוג הזה יהיה מחרוזת שעשויה להפנות למשתנים. הווידג'ט להזנת טקסט שמוצג בממשק המשתמש של Tag Manager יכול להיות שדה טקסט של שורה אחת או שדה טקסט של כמה שורות. |
תפריט נפתח |
תפריט נפתח שבו אפשר לבחור רק פריט אחד בתור הערך של פרמטר התבנית. כדאי לרשום את הפריטים בסדר אלפביתי, אלא אם יש סיבה טובה לעשות אחרת. |
תיבת סימון |
קלט של תיבת סימון. הערך של פרמטר תבנית מהסוג הזה יהיה בוליאני: true אם התיבה מסומנת, ו-false אם היא לא מסומנת. |
לחצן בחירה |
קלט רדיו. פרמטר תבנית מהסוג הזה מציג רשימה של אפשרויות בממשק המשתמש של Tag Manager, והמשתמש רשאי לבחור רק אחת מהאפשרויות כערך של פרמטר התבנית. |
טבלה פשוטה |
קלט פשוט של טבלה. אפשר לערוך כל תא בטבלה במקום, וכל תא יכול להיות רק משני סוגים: קלט טקסט או תפריט נפתח. הערך של פרמטר תבנית מהסוג הזה הוא מערך של אובייקטים: כל אובייקט מקודד שורה, כל מפתח באובייקט חייב להיות אחד משמות העמודות וכל ערך באובייקט הוא הערך של התא התואם. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\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. |"]]