Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Działania „Przejdź do” przenoszą użytkownika do Twojej witryny, w której może on wykonać daną czynność. W przeciwieństwie do działań wymagających jednego kliknięcia, działania wymagające przejścia można wykonywać wielokrotnie.
Działania w Gmailu.
Przypadki użycia
Obecnie obsługiwane w Gmailu działania „Przejdź do” to:
Do e-maili, które wymagają od użytkowników przejścia do Twojej witryny w celu wykonania działania, możesz dodać przycisk ViewAction.
Poniższa deklaracja dodaje do e-maila przycisk ViewAction:
JSON-LD
<scripttype="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>
Mikrodane
<divitemscopeitemtype="http://schema.org/EmailMessage">
<divitemprop="potentialAction"itemscopeitemtype="http://schema.org/ViewAction">
<linkitemprop="target"href="https://watch-movies.com/watch?movieId=abc123"/>
<metaitemprop="name"content="Watch movie"/>
</div>
<metaitemprop="description"content="Watch the 'Avengers' movie online"/>
</div>
Dane wydawcy
Możesz dodać szczegóły dotyczące organizacji wysyłającej e-maila, ustawiając pole publisher:
JSON-LD
<scripttype="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>
Mikrodane
<divitemscopeitemtype="http://schema.org/EmailMessage">
<metaitemprop="description"content="Watch the 'Avengers' movie online"/>
<divitemprop="potentialAction"itemscopeitemtype="http://schema.org/ViewAction">
<linkitemprop="target"href="https://watch-movies.com/watch?movieId=abc123"/>
<metaitemprop="name"content="Watch movie"/>
</div>
<divitemprop="publisher"itemscopeitemtype="http://schema.org/Organization">
<metaitemprop="name"content="Google Play"/>
<linkitemprop="url"href="https://play.google.com"/>
<linkitemprop="url/googlePlus"href="https://plus.google.com/106886664866983861036"/>
</div>
</div>
Śledzenie działania
Możesz dodać do e-maili TrackAction przycisk, który będzie wymagał od użytkowników przejścia do Twojej witryny w celu śledzenia dostarczanych przesyłek.
Gdy określisz właściwość trackingUrl, działanie zostanie wygenerowane automatycznie. Aby utworzyć link bezpośrednio do aplikacji mobilnej, dodaj też znak TrackAction, jak pokazano poniżej:
Znaczniki możesz sprawdzać za pomocą narzędzia do testowania znaczników e-maili. Wklej kod znaczników i kliknij przycisk Sprawdź, aby przeskanować treść i otrzymać raport o wszelkich błędach.
Specyfikacja
Specyfikację różnych typów działań „przejdź do” znajdziesz w dokumentacji dotyczącej konkretnego typu ViewAction lub TrackAction.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-08-04 UTC."],[],[],null,["Go-To Actions take the user to your website where the action can be completed. Unlike [One Click Actions](/workspace/gmail/markup/reference/one-click-action), go-to actions can be interacted with multiple times.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nGo-to actions in Gmail.\n\n\u003cbr /\u003e\n\nUse Cases\n\nGo-To Actions currently supported by Gmail are:\n\n- [ViewAction](#view_action)\n- [TrackAction](#track_action)\n\nMore actions might be supported in the future.\n| **Note:** Before you start, make sure you understand how to [embed schemas in emails](/workspace/gmail/markup/embedding-schemas-in-emails) and you are familiar with [testing schemas](/workspace/gmail/markup/testing-your-schema).\n\nView Action\n\nYou can add a `ViewAction` button to emails requiring users to go to your site to complete the action.\n\nThe following declaration adds a `ViewAction` button to an email: \n\nJSON-LD \n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"ViewAction\",\n \"url\": \"https://watch-movies.com/watch?movieId=abc123\",\n \"name\": \"Watch movie\"\n },\n \"description\": \"Watch the 'Avengers' movie online\"\n }\n \u003c/script\u003e\n\nMicrodata \n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ViewAction\"\u003e\n \u003clink itemprop=\"target\" href=\"https://watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003cmeta itemprop=\"name\" content=\"Watch movie\"/\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"description\" content=\"Watch the 'Avengers' movie online\"/\u003e\n \u003c/div\u003e\n\nPublisher data\n\nYou can add details about the organization sending the email message by setting the `publisher` field: \n\nJSON-LD \n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"description\": \"Watch the 'Avengers' movie online\",\n \"potentialAction\": {\n \"@type\": \"ViewAction\",\n \"url\": \"https://watch-movies.com/watch?movieId=abc123\",\n \"name\": \"Watch movie\"\n },\n \"publisher\": {\n \"@type\": \"Organization\",\n \"name\": \"Google Play\",\n \"url\": \"https://play.google.com\",\n \"url/googlePlus\": \"https://plus.google.com/106886664866983861036\"\n }\n }\n \u003c/script\u003e\n\nMicrodata \n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cmeta itemprop=\"description\" content=\"Watch the 'Avengers' movie online\"/\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ViewAction\"\u003e\n \u003clink itemprop=\"target\" href=\"https://watch-movies.com/watch?movieId=abc123\"/\u003e\n \u003cmeta itemprop=\"name\" content=\"Watch movie\"/\u003e\n \u003c/div\u003e\n \u003cdiv itemprop=\"publisher\" itemscope itemtype=\"http://schema.org/Organization\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Google Play\"/\u003e\n \u003clink itemprop=\"url\" href=\"https://play.google.com\"/\u003e\n \u003clink itemprop=\"url/googlePlus\" href=\"https://plus.google.com/106886664866983861036\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\nTrack Action\n\nYou may add a `TrackAction` button to emails requiring users to go to your site to track packages being delivered.\n\nAn action is automatically generated when you specify the `trackingUrl` property. To link directly to a mobile application,\nalso include a `TrackAction` as shown: \n\nJSON-LD \n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"ParcelDelivery\",\n \"deliveryAddress\": {\n \"@type\": \"PostalAddress\",\n \"streetAddress\": \"24 Willie Mays Plaza\",\n \"addressLocality\": \"San Francisco\",\n \"addressRegion\": \"CA\",\n \"addressCountry\": \"US\",\n \"postalCode\": \"94107\"\n },\n \"expectedArrivalUntil\": \"2013-03-12T12:00:00-08:00\",\n \"carrier\": {\n \"@type\": \"Organization\",\n \"name\": \"FedEx\"\n },\n \"itemShipped\": {\n \"@type\": \"Product\",\n \"name\": \"iPod Mini\"\n },\n \"partOfOrder\": {\n \"@type\": \"Order\",\n \"orderNumber\": \"176057\",\n \"merchant\": {\n \"@type\": \"Organization\",\n \"name\": \"Bob Dole\"\n }\n },\n \"trackingUrl\": \"http://fedex.com/track/1234567890\"\n \"potentialAction\": {\n \"@type\": \"TrackAction\",\n \"target\": \"http://fedex.com/track/1234567890\"\n },\n }\n \u003c/script\u003e\n\nMicrodata \n\n \u003cdiv itemscope itemtype=\"http://schema.org/ParcelDelivery\"\u003e\n \u003cdiv itemprop=\"deliveryAddress\" itemscope itemtype=\"http://schema.org/PostalAddress\"\u003e\n \u003cmeta itemprop=\"streetAddress\" content=\"24 Willie Mays Plaza\"/\u003e\n \u003cmeta itemprop=\"addressLocality\" content=\"San Francisco\"/\u003e\n \u003cmeta itemprop=\"addressRegion\" content=\"CA\"/\u003e\n \u003cmeta itemprop=\"addressCountry\" content=\"US\"/\u003e\n \u003cmeta itemprop=\"postalCode\" content=\"94107\"/\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"expectedArrivalUntil\" content=\"2013-03-12T12:00:00-08:00\"/\u003e\n \u003cdiv itemprop=\"carrier\" itemscope itemtype=\"http://schema.org/Organization\"\u003e\n \u003cmeta itemprop=\"name\" content=\"FedEx\"/\u003e\n \u003c/div\u003e\n \u003cdiv itemprop=\"itemShipped\" itemscope itemtype=\"http://schema.org/Product\"\u003e\n \u003cmeta itemprop=\"name\" content=\"iPod Mini\"/\u003e\n \u003c/div\u003e\n \u003cdiv itemprop=\"partOfOrder\" itemscope itemtype=\"http://schema.org/Order\"\u003e\n \u003cmeta itemprop=\"orderNumber\" content=\"176057\"/\u003e\n \u003cdiv itemprop=\"merchant\" itemscope itemtype=\"http://schema.org/Organization\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Bob Dole\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003clink itemprop=\"trackingUrl\" href=\"http://fedex.com/track/1234567890\"/\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/TrackAction\"\u003e\n \u003clink itemprop=\"target\" href=\"http://fedex.com/track/1234567890\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\nTest your markup\n\nYou can validate your markup using the [Email Markup Tester Tool](https://www.google.com/webmasters/markup-tester/). Paste in your markup code and click the **Validate** button to scan the content and receive a report on any errors present.\n\nSpecification\n\nFor a specification of the various go-to action types, see the documentation\nfor the specific type [ViewAction](/workspace/gmail/markup/reference/types/ViewAction) or\n[TrackAction](/workspace/gmail/markup/reference/types/TrackAction).\n| **Note:** Some of the schemas used by Google are still going through the standardization process of [schema.org](http://schema.org), and therefore, may change in the future. [Learn More](/workspace/gmail/markup/reference/schema-org-proposals)."]]