指定動作連結 (舊版)

動作連結可讓使用者與深層連結互動 會連結至合作夥伴的網站執行動作。深層連結 的產品資訊。本指南將說明 在動態饋給中加入動作連結。

可以在以下兩個地方提供動作連結:

  • 商家動態饋給 - 單一商家提供多項服務時,透過商家動態饋給導入動作連結 他們會執行類似的動作
  • 服務動態饋給 - 單一商家提供多項服務時,透過服務動態饋給導入動作連結 執行不同的動作

在所有服務都適用的情況下,你應透過 Merchant 動態饋給提供動作連結 ,指定商家 將使用者重新導向至 夥伴網站。

這通常對餐飲業來說是唯一的導入方法 因為每個商家只有一項服務

示例如下:

  • 商家提供多種服務,例如 瑜伽課程、拳擊課程、自行車課程、剪髮、染髮、洗髮精。 動作連結重新導向至到達網頁 顯示商家的完整服務目錄
,瞭解如何調查及移除這項存取權。

必須使用屬於自身的 ActionLinkType 指定動作類型 ActionLink 連結。

  // Predetermined type of action associated with an action link.
  enum ActionLinkType {
    // The action link type is unspecified.
    ACTION_LINK_TYPE_UNSPECIFIED = 0;

    // The action link type is booking an appointment.
    ACTION_LINK_TYPE_BOOK_APPOINTMENT = 1;

    // The action link type is booking an online appointment.
    ACTION_LINK_TYPE_BOOK_ONLINE_APPOINTMENT = 2;

    // The action link type is ordering food for delivery or takeout or both.
    ACTION_LINK_TYPE_ORDER_FOOD = 3;

    // The action link type is ordering food for delivery.
    ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY = 4;

    // The action link type is ordering food for takeout.
    ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT = 5;

    // The action link type is making a dining reservation.
    ACTION_LINK_TYPE_MAKE_DINING_RESERVATION = 6;

    // The action link type allows users to shop from the given merchant. It
    // could either be delivery or pickup.
    ACTION_LINK_TYPE_SHOP_ONLINE = 7;
  }

商家 每項服務都含有不同的深層連結,或商家有多個服務 執行不同的動作,例如訂餐和訂位

示例如下:

  • 餐廳提供餐廳訂位和訂餐服務。1 項動作 連結會將使用者重新導向至餐廳訂位頁面,再透過其他重新導向連結前往 使用者前往訂餐頁面

您可以使用以下項目中的 ServiceType 指定動作類型: ActionLinkType ActionLink 的資料。

  enum ServiceType {
    SERVICE_TYPE_UNSPECIFIED = 0;

    // Service that provides dining reservation.
    SERVICE_TYPE_DINING_RESERVATION = 1;

    // Service that provides food ordering in general, could be either takeout
    // or delivery or both.
    SERVICE_TYPE_FOOD_ORDERING = 2;

    // Service that only provides food delivery.
    SERVICE_TYPE_FOOD_DELIVERY = 6;

    // Service that only provides food takeout.
    SERVICE_TYPE_FOOD_TAKEOUT = 7;

    // Services that provide event based ticketing (e.g. concerts, sporting
    // events, shows). Do not use for Reserve with Google integrations.
    SERVICE_TYPE_EVENT_TICKET = 3;
    SERVICE_TYPE_TRIP_TOUR = 4;

    // Service that provides appointments or classes. Recommended for (1) health
    // and fitness, (2) spa and beauty, and (3) financial consults and
    // evaluations services. Please see the supported service types:
    // https://developers.google.com/maps-booking/guides/end-to-end-integration/overview
    SERVICE_TYPE_APPOINTMENT = 5;

    // Service that provides appointment for an online class or session which
    // will be fully virtual. Must be set if enabling virtual service bookings.
    SERVICE_TYPE_ONLINE_APPOINTMENT = 8;

    // Service that allows users to shop from the given merchant. It could
    // either be delivery or pickup.
    SERVICE_TYPE_SHOPPING = 9;
  }
敬上

使用 OrderOnlineMetadata

OrderOnlineMetadata 要指定要顯示的資訊。 使用者對於任何費用、最低訂單金額與供應情形 線上購物完成方式如加入這類中繼資料,系統就會加入中繼資料。 與 Merchant 動態饋給中的動作連結共用

如要進一步瞭解如何在 動態饋給 (如有整合需求),請參閱下列資源: 說明文件: