Es gibt vier Möglichkeiten, einem Angebot Links hinzuzufügen.
Mit OfferClass.LinksModuleData kannst du allen Angeboten, die mit der OfferClass verknüpft sind, Links hinzufügen.
Verwende OfferObject.LinksModuleData, um einen Link zu einem bestimmten Angebot OfferObject hinzuzufügen.
Verwende OfferObject.appLinkData, um einen App-Link unten auf der Karte bzw. dem Ticket zu platzieren.
Verwenden Sie OfferClass.appLinkData, um einen App-Link unten in allen Karten/Tickets dieser Kursklasse zu platzieren.
Ein Vorteil der App-Verknüpfung besteht darin, dass dein Call-to-Action-Kanal Nutzer über Google Wallet zu deinen Markeninhalten leiten kann. Links mit dieser Funktion werden unten auf der Karte bzw. dem Ticket angezeigt.
Beispiel für eine Funktion
Aussteller
App-Link in Google Wallet-Karte/-Ticket einrichten
Lege bei einem bestimmten Angebot das Feld OfferObject.appLinkData auf den URI oder Paketnamen der App oder Website fest.
Im folgenden Quellcode findest du das Format und den Kontext des Felds appLinkData:
Das Feld displayText ist auf 30 Zeichen begrenzt.
[null,null,["Zuletzt aktualisiert: 2025-02-28 (UTC)."],[[["There are four ways to add links to an offer, including using `OfferClass.LinksModuleData`, `OfferObject.LinksModuleData`, `OfferObject.appLinkData`, and `OfferClass.appLinkData`."],["App linking enhances call-to-action by directing users to branded experiences from Google Wallet, with links displayed at the bottom of the Pass."],["You can set the `OfferObject.appLinkData` field to the URI or Package name to enable app linking for a specific offer."],["The `appLinkData` field allows you to specify `androidAppLinkInfo` and `webAppLinkInfo` for deep linking into your app or website, with a customizable `displayText` limited to 30 characters."],["While linking to the Play Store is possible using `targetUri` within `androidAppLinkInfo`, it's recommended to utilize `packageName` for a direct in-app experience."]]],["Links can be added to offers in four ways: using `OfferClass.LinksModuleData` for all offers, `OfferObject.LinksModuleData` for a specific offer, `OfferObject.appLinkData` for a particular pass's app link, or `OfferClass.appLinkData` for all passes of that class' app links. App links, which appear at the bottom of the pass, let the user navigate to branded experiences. `OfferObject.appLinkData` accepts app URIs or package names, with `displayText` limited to 30 characters. `webAppLinkInfo` supports deep linking.\n"]]