Wymagania wstępne
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aby wdrożyć remarketing dynamiczny, musisz spełnić te wymagania wstępne.
Instalowanie tagu Google i fragmentu kodu zdarzenia remarketingowego
Zacznij od dodania tagu remarketingowego do witryny.
Wartości googleGlobalSiteTag
lub event_snippet
możesz pobrać z interfejsu API za pomocą pola TagSnippet
w polu conversion_action
.
Aby ręcznie umieścić tagi w witrynie:
Pobierz tag Google i fragment kodu zdarzenia remarketingowego.
Tag Google tworzy w Twojej witrynie nowy plik cookie, który zbiera informacje o kliknięciu reklamy, dzięki któremu użytkownik trafił na Twoją stronę, i dodaje użytkowników witryny do standardowych list remarketingowych na Twoim koncie Google Ads.
Aby mieć pewność, że tagowanie działa z remarketingiem dynamicznym, podczas kroku Tworzenie źródła danych tagu Google Ads wybierz opcję Zbieraj określone atrybuty lub parametry, by spersonalizować reklamy, jak pokazano poniżej:

Szczegółowe instrukcje uzyskiwania tagu Google i fragmentu kodu zdarzenia remarketingowego znajdziesz w artykule Tagowanie witryny za pomocą Google Ads.
Zainstaluj tag Google.
Tag Google musisz zainstalować na wszystkich stronach swojej witryny, które wysyłają informacje na potrzeby remarketingu, ale dla każdego konta Google Ads potrzebujesz tylko 1 takiego tagu. Fragmentu kodu zdarzenia można używać do śledzenia dodatkowych działań, które mają być liczone jako zdarzenia remarketingowe. Zainstaluj ten fragment kodu na stronach witryny, które chcesz śledzić, tuż po tagu Google w sekcji <head></head>
.
Tag Google współpracuje też z innymi tagami, np. tagami Google Analytics.
Więcej informacji o działaniu tagów w Google Analytics
Zainstaluj fragment kodu zdarzenia na stronach witryny, które chcesz śledzić, z odpowiednimi wartościami parametrów niestandardowych.
Parametry niestandardowe to elementy kodu tagu remarketingowego, które umożliwiają tagowi wysyłanie do konta Google Ads informacji o konkretnych produktach lub wyborach w Twojej witrynie. Parametry niestandardowe są bezpośrednio powiązane z plikami firmowych baz danych, w których dodajesz wartości odpowiadające informacjom zbieranym przez tag.
Aby korzystać z remarketingu dynamicznego, musisz używać parametrów niestandardowych oznaczonych symbolemRequired
, zgodnie z opisem w artykule Remarketing dynamiczny – zdarzenia i parametry.
Gdy dodasz wartość parametru niestandardowego do tagu remarketingowego, zostanie ona zsynchronizowana z plikiem danych, aby w reklamach wyświetlać ten sam produkt lub usługę, które wcześniej oglądał ten sam użytkownik.
Oto przykład instalacji fragmentu kodu zdarzenia w witrynie sklepu (zwróć uwagę, że ecomm_prodid
to identyfikator produktu w Merchant Center, który odpowiada produktowi na stronie):
gtag('event', 'page_view', {
ecomm_pagetype: 'product',
ecomm_prodid: 34592212,
ecomm_totalvalue: 29.99,
ecomm_category: 'Home & Garden',
isSaleItem: false
});
Szczegółowe definicje parametrów i ich prawidłowe wartości znajdziesz w artykule Remarketing dynamiczny – zdarzenia i parametry.
Używana nazwa zdarzenia (np. page_view
w przykładzie powyżej) może być wybraną przez Ciebie nazwą zdarzenia niestandardowego lub jedną z naszych rekomendowanych standardowych nazw zdarzeń.
Na potrzeby implementacji remarketingu dynamicznego nie musi on pasować do żadnej konkretnej wartości, o ile parametry danych zdarzenia (w tym przykładzie ecomm_pagetype
, ecomm_prodid
i ecomm_totalvalue
) są prawidłowo skonfigurowane.
Szczegółową dokumentację dotyczącą parametrów niestandardowych dla różnych typów działalności i działania tagu Google znajdziesz w artykule Konfigurowanie śledzenia konwersji w witrynie.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-26 UTC."],[[["\u003cp\u003eInstall the Google tag and remarketing event snippet on all website pages to enable dynamic remarketing.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting up the Google tag, ensure you select "Collect specific attributes or parameters to personalize ads" for dynamic remarketing functionality.\u003c/p\u003e\n"],["\u003cp\u003eUtilize custom parameters within the event snippet to send specific product or service information to your Google Ads account for targeted ads.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the custom parameters, such as 'ecomm_prodid', align with your business data feeds for accurate product or service synchronization in ads.\u003c/p\u003e\n"]]],[],null,["# Prerequisites\n\nFollow these prerequisites to implement dynamic remarketing.\n\nInstall Google tag and remarketing event snippet\n------------------------------------------------\n\nBegin by\n[tagging your site for remarketing](//support.google.com/google-ads/answer/2476688).\nYou can retrieve the `googleGlobalSiteTag` or `event_snippet` from the API using\nthe [`TagSnippet`](/google-ads/api/reference/rpc/v21/TagSnippet) of the\n[`conversion_action`](/google-ads/api/fields/v21/conversion_action) field.\n\nHere are the steps for embedding tags in your website manually:\n\n1. **Get the Google tag and the remarketing event snippet.**\n\n The Google tag sets a new cookie on your site which collects information\n about the ad click that brought a visitor to your site and adds website\n visitors to standard remarketing lists in your Google Ads account.\n\n To make sure the tagging works with dynamic remarketing, select **Collect\n specific attributes or parameters to personalize ads** during the step\n **Create the Google Ads tag data source**, as shown below:\n\n For detailed instructions for acquiring the Google tag and remarketing event\n snippet, see\n [Tag your website using Google Ads](//support.google.com/google-ads/answer/2476688).\n2. **Install the Google tag.**\n\n You must install the Google tag on all the pages of your website that\n send remarketing information, but you need only one Google tag for each\n Google Ads account. The event snippet can be used to track additional actions\n that are to be counted as remarketing events. Install this snippet on site\n pages you'd like to track, right after the Google tag in the\n `\u003chead\u003e\u003c/head\u003e` section.\n\n The Google tag also works with other tags such as Google Analytics tags.\n [Read more about how tags work in Google\n Analytics](/analytics/devguides/collection/gtagjs).\n3. **Install an event snippet on site pages you would like to track, with\n corresponding custom parameter values.**\n\n Custom parameters are elements in your remarketing tag code that allow your\n tag to send information about specific items or selections on your website to\n your Google Ads account. Custom parameters are directly related to business\n data feeds, where you add the values that correspond to the information\n the tag collects.\n\n To use dynamic remarketing, you'll need to use the custom parameters marked\n as `Required`, as described in\n [Dynamic remarketing events and parameters](//support.google.com/google-ads/answer/7305793).\n\n When you add the value of a custom parameter to your remarketing tag,\n it will sync with your feed to show the same product or service in\n your ads previously viewed by the same visitor.\n\n Here is an example of how to install an event snippet for a retail site (note\n the `ecomm_prodid` is the [Merchant Center Product\n ID](//support.google.com/merchants/answer/7052112) that corresponds to the\n product on the page): \n\n gtag('event', 'page_view', {\n ecomm_pagetype: 'product',\n ecomm_prodid: 34592212,\n ecomm_totalvalue: 29.99,\n ecomm_category: 'Home & Garden',\n isSaleItem: false\n });\n\n For detailed definitions of the parameters and their valid values,\n see\n [Dynamic remarketing events and parameters](//support.google.com/google-ads/answer/7305793).\n\n The event name you use (such as `page_view` in the above example) can be a\n custom event name of your choosing or one of our recommended standard events.\n It doesn't need to match any specific value for the purpose of implementing\n dynamic remarketing, as long as the event data parameters (`ecomm_pagetype`,\n `ecomm_prodid`, and `ecomm_totalvalue` in this example) are correctly set.\n\n For detailed documentation on custom parameters for different business types\n and how the Google tag works, refer to\n [Set up conversion tracking for your website](//support.google.com/google-ads/answer/12216424)."]]