Thao tác nhanh

Hành động Chuyển đến đưa người dùng đến trang web của bạn, nơi có thể hoàn tất hành động. Không giống như Hành động một lần nhấp, người dùng có thể tương tác nhiều lần với hành động chuyển đến.

Đường liên kết GoTo trong Gmail
Chuyển đến các thao tác trong Gmail.

Trường hợp Sử dụng

Hành động chuyển đến hiện được Gmail hỗ trợ bao gồm:

Các thao tác khác có thể được hỗ trợ trong tương lai.

Xem hành động

Bạn có thể thêm nút ViewAction vào email yêu cầu người dùng phải truy cập vào trang web của bạn để hoàn tất hành động.

Phần khai báo sau đây sẽ thêm nút ViewAction vào một email:

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "potentialAction": {
    "@type": "ViewAction",
    "url": "https://watch-movies.com/watch?movieId=abc123",
    "name": "Watch movie"
  },
  "description": "Watch the 'Avengers' movie online"
}
</script>

Vi dữ liệu

<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="target" href="https://watch-movies.com/watch?movieId=abc123"/>
    <meta itemprop="name" content="Watch movie"/>
  </div>
  <meta itemprop="description" content="Watch the 'Avengers' movie online"/>
</div>

Dữ liệu của nhà xuất bản

Bạn có thể thêm thông tin chi tiết về tổ chức gửi email bằng cách đặt trường publisher:

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "description": "Watch the 'Avengers' movie online",
  "potentialAction": {
    "@type": "ViewAction",
    "url": "https://watch-movies.com/watch?movieId=abc123",
    "name": "Watch movie"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Google Play",
    "url": "https://play.google.com",
    "url/googlePlus": "https://plus.google.com/106886664866983861036"
  }
}
</script>

Vi dữ liệu

<div itemscope itemtype="http://schema.org/EmailMessage">
  <meta itemprop="description" content="Watch the 'Avengers' movie online"/>
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="target" href="https://watch-movies.com/watch?movieId=abc123"/>
    <meta itemprop="name" content="Watch movie"/>
  </div>
  <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Google Play"/>
    <link itemprop="url" href="https://play.google.com"/>
    <link itemprop="url/googlePlus" href="https://plus.google.com/106886664866983861036"/>
  </div>
</div>

Hành động theo dõi

Bạn có thể thêm nút TrackAction vào email yêu cầu người dùng truy cập vào trang web của bạn để theo dõi các gói hàng đang được gửi.

Một thao tác sẽ được tạo tự động khi bạn chỉ định thuộc tính trackingUrl. Để liên kết trực tiếp đến ứng dụng dành cho thiết bị di động, bạn cũng cần thêm TrackAction như sau:

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "ParcelDelivery",
  "deliveryAddress": {
    "@type": "PostalAddress",
    "streetAddress": "24 Willie Mays Plaza",
    "addressLocality": "San Francisco",
    "addressRegion": "CA",
    "addressCountry": "US",
    "postalCode": "94107"
  },
  "expectedArrivalUntil": "2013-03-12T12:00:00-08:00",
  "carrier": {
    "@type": "Organization",
    "name": "FedEx"
  },
  "itemShipped": {
    "@type": "Product",
    "name": "iPod Mini"
  },
  "partOfOrder": {
    "@type": "Order",
    "orderNumber": "176057",
    "merchant": {
      "@type": "Organization",
      "name": "Bob Dole"
    }
  },
  "trackingUrl": "http://fedex.com/track/1234567890"
  "potentialAction": {
    "@type": "TrackAction",
    "target": "http://fedex.com/track/1234567890"
  },
}
</script>

Vi dữ liệu

<div itemscope itemtype="http://schema.org/ParcelDelivery">
  <div itemprop="deliveryAddress" itemscope itemtype="http://schema.org/PostalAddress">
    <meta itemprop="streetAddress" content="24 Willie Mays Plaza"/>
    <meta itemprop="addressLocality" content="San Francisco"/>
    <meta itemprop="addressRegion" content="CA"/>
    <meta itemprop="addressCountry" content="US"/>
    <meta itemprop="postalCode" content="94107"/>
  </div>
  <meta itemprop="expectedArrivalUntil" content="2013-03-12T12:00:00-08:00"/>
  <div itemprop="carrier" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="FedEx"/>
  </div>
  <div itemprop="itemShipped" itemscope itemtype="http://schema.org/Product">
    <meta itemprop="name" content="iPod Mini"/>
  </div>
  <div itemprop="partOfOrder" itemscope itemtype="http://schema.org/Order">
    <meta itemprop="orderNumber" content="176057"/>
    <div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Bob Dole"/>
    </div>
  </div>
  <link itemprop="trackingUrl" href="http://fedex.com/track/1234567890"/>
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/TrackAction">
    <link itemprop="target" href="http://fedex.com/track/1234567890"/>
  </div>
</div>

Kiểm tra mục đánh dấu của bạn

Bạn có thể xác thực mã đánh dấu bằng cách sử dụng Công cụ kiểm tra đánh dấu email. Dán mã đánh dấu của bạn và nhấp vào nút Xác thực để quét nội dung và nhận báo cáo về mọi lỗi hiện có.

Thông số kỹ thuật

Để biết thông số kỹ thuật của các loại hành động chuyển đến khác nhau, vui lòng xem tài liệu cho loại cụ thể ViewAction hoặc TrackAction.