Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hãy làm theo các mẹo sau để đảm bảo email AMP hiển thị chính xác và nhất quán trên tất cả các nền tảng và trình duyệt mà Gmail hỗ trợ.
Văn bản tóm tắt hiển thị bên cạnh dòng tiêu đề khi xem email trong hộp thư đến (dòng tiêu đề trước) dựa trên phần text/html hoặc text/plain của email và không tính đến phần text/x-amp-html.
Tính năng tìm kiếm của Gmail không lập chỉ mục các phần động của email. Để giúp người dùng tìm thấy email của bạn, hãy thêm các từ khoá quan trọng nhất vào phần text/html hoặc text/plain của email.
Dữ liệu biểu mẫu amp-form được gửi đến điểm cuối của bạn luôn được mã hoá dưới dạng application/x-www-form-urlencoded, bất kể giá trị của thuộc tính enctype được đặt trên phần tử <form>.
Vì email động chứa nội dung mới nhất, nên người dùng có thể nhận được email trùng lặp trong cùng một chuỗi thư. Ví dụ: các email nhận xét trong Google Tài liệu trong một chuỗi email cho cùng một chuỗi nhận xét sẽ giống hệt nhau khi mở rộng. Gmail có thể ngăn việc hiển thị các email trùng lặp này trong chuỗi thư dài bằng cách thu gọn các email có nội dung trùng lặp. Để đảm bảo rằng email được nhận dạng là trùng lặp, hãy thêm thẻ meta email.contentIds vào mã đánh dấu AMP.
Nội dung của thẻ meta này phải chứa danh sách các chuỗi được phân tách bằng dấu phẩy, xác định các phần nội dung riêng biệt trong email động. Nếu nhóm mã nội dung của email cuối cùng trong chuỗi là tập hợp con (không nghiêm ngặt) của nhóm mã nội dung của mọi email khác trong chuỗi, thì tất cả email ngoại trừ email cuối cùng sẽ được thu gọn tương ứng.
Ví dụ: một chuỗi email có các nhóm mã nội dung sau đây sẽ bị thu gọn:
id1
id1
id1
Chuỗi email có các nhóm mã nội dung sau đây cũng sẽ bị thu gọn:
id1, id2
id2, id3
id1, id2, id3
Khi email chứa một biểu mẫu có các phần tử nhập, nếu các phần tử nhập thay đổi, người dùng có thể thấy một thông báo xác nhận trước khi rời khỏi email mà không gửi biểu mẫu. Thông báo xác nhận này không xuất hiện trong một số trường hợp, chẳng hạn như nếu người dùng xoá biểu mẫu hoặc xoá thư.
Mẫu amp-mustache không được chứa thẻ dấu phân cách tập hợp.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-03-25 UTC."],[],[],null,["# Tips and known limitations\n\nFollow these tips to ensure your AMP emails render correctly and consistently\nacross all platforms and browsers that Gmail supports.\n| **Note:** This list is in addition to [AMP for Email best\n| practices](https://amp.dev/documentation/guides-and-tutorials/develop/amp_email_best_practices?format=email), which apply across multiple email providers.\n\n- The summary text displayed next to the subject line when viewing emails in\n your inbox (preheader) is based on the `text/html` or `text/plain` part of\n your email and doesn't take the `text/x-amp-html` part into account.\n\n- Gmail's search feature doesn't index the dynamic parts of the\n email. To help users find your emails, include the most important keywords\n in the `text/html` or `text/plain` part of the email.\n\n- [Email Markup](/workspace/gmail/markup) and [Promotions\n Annotations](/workspace/gmail/promotab) are parsed from the `text/html`\n part of the email and ignored in the `text/x-amp-html` part.\n\n- `amp-form` form data sent to your endpoint is always encoded as\n `application/x-www-form-urlencoded`, regardless of the value of the\n `enctype` attribute set on the `\u003cform\u003e` element.\n\n- Because dynamic emails contain up-to-date content, users might receive\n duplicate emails within the same thread. For example, the Google Docs\n commenting emails in one email thread for the same comment thread will all\n look identical when expanded. Gmail can prevent the display\n of these duplicate emails in long threads by collapsing emails with\n duplicate content. To ensure that emails are recognized as duplicates, add\n the meta tag `email.contentIds` to the AMP markup.\n\n \u003chead\u003e\n ...\n \u003cmeta name=\"email.contentIds\" content=\"id1,id2,id3\"\u003e\n ...\n \u003c/head\u003e\n\n The content of this meta tag should contain a comma separated list of\n strings identifying unique pieces of content within dynamic emails. If the\n content ID set of the last email in the thread is a (non-strict) superset of\n the content ID set of every other email in the thread, then all emails\n except the last one will be collapsed accordingly.\n\n For example, an email thread with the following content ID sets will be\n collapsed:\n - id1\n - id1\n - id1\n\n An email thread with the following content ID sets will also be collapsed:\n - id1, id2\n - id2, id3\n - id1, id2, id3\n- When the email contains a form with input elements, if the inputs are\n changed the user might see a confirmation before navigating away from the\n email without submitting the form. This confirmation isn't shown in some\n cases, such as if the user clears the form or upon message deletion.\n\n- `amp-mustache` templates can't contain set delimiter tags."]]