Przejdź na Menedżera tagów Google
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Aby w pełni wykorzystać możliwości Menedżera tagów Google, przenieś do Menedżera tagów wszystkie (lub jak najwięcej) istniejących tagów. Oto zalecane czynności:
Mapowanie witryny (opcjonalne)
Zastanów się, jakie tagi zostały obecnie wdrożone w Twojej witrynie. Zastanów się, jakie działania (zdarzenia) chcesz śledzić i jakie dane (zmienne) chcesz zbierać. Utwórz mapę tagów, dane, które mają być zbierane, oraz wskaż zdarzenia lub strony, które chcesz z nimi powiązać.
Instalowanie kodu Menedżera tagów w witrynie
Po zmapowaniu witryny zainstaluj w niej tag kontenera Menedżera tagów i wdróż go. Więcej informacji znajdziesz we wskazówkach dotyczących instalacji.
Dodawanie zdarzeń i zmiennych
Dostosuj instalację Menedżera tagów Google, korzystając z metod opisanych w wytycznych dotyczących zdarzeń.
Konfigurowanie tagów i powiązanych z nimi reguł w Menedżerze tagów
Gdy zainstalujesz Menedżera tagów w swojej witrynie, dodaj do niej tagi witryny. W tym momencie NIE publikuj. Wystarczy dodać i skonfigurować tagi ze swojej witryny w Menedżerze tagów, używając odpowiednich szablonów i reguł. Więcej informacji o aktywatorach
Ostateczna zamiana migracji
Ostatnim krokiem jest równoczesne zastąpienie starych tagów i opublikowanie ich w Menedżerze tagów Google. W ciągu kilku minut musisz:
- Usuwanie tagów witryny jednym naciśnięciem kodu
- Gdy operacja się zakończy, naciśnij przycisk „Opublikuj” przy wersji kontenera.
Może to spowodować niewielką lukę w danych, ale po zakończeniu początkowej wymiany nie będą już wyświetlane żadne luki. Możesz też złożyć zamówienie tutaj i opublikować je na krótko przed wprowadzeniem zmian w witrynie. Może to spowodować drobne duplikowanie danych zamiast niewielkiej luki w danych.
Po zakończeniu wstępnej migracji do Menedżera tagów wszystkie kolejne potrzeby konfiguracji tagów możesz obsługiwać bez wprowadzania zmian w kodzie za pomocą interfejsu Menedżera tagów.
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: 2024-07-29 UTC.
[null,null,["Ostatnia aktualizacja: 2024-07-29 UTC."],[[["\u003cp\u003eMigrate all existing website tags to Google Tag Manager for centralized management.\u003c/p\u003e\n"],["\u003cp\u003eMap your website's tags, data, and events for a smooth transition.\u003c/p\u003e\n"],["\u003cp\u003eInstall Tag Manager code, add events and variables, and configure tags within the interface.\u003c/p\u003e\n"],["\u003cp\u003eSwap out old tags with the new Tag Manager setup to complete the migration.\u003c/p\u003e\n"],["\u003cp\u003eManage future tag configurations without code changes through the Tag Manager interface.\u003c/p\u003e\n"]]],["To utilize Google Tag Manager, migrate existing tags by mapping your site's tags, data, and events. Install the Tag Manager code, then customize it with events and variables. Configure tags and triggers within Tag Manager's interface. Lastly, simultaneously remove old site tags and publish the configured tags in Tag Manager, which you can do in a few minutes. After migration, future tag adjustments occur through Tag Manager's interface without code changes.\n"],null,["# Migrate to Google Tag Manager\n\nTo gain the most value from Google Tag Manager, you should migrate all (or as\nmany as possible) of your existing tags into Tag Manager. The recommended steps\nare as follows:\n\n1. **Map your site (optional)**\n\n Think about which tags you might currently have deployed on your site. Think\n about what actions (events) you want to track and what data (variables)\n you'll want to collect. Create a map of tags, the data to be collected, and\n which events or pages you want to associate with those tags.\n2. **Install the Tag Manager code on your site**\n\n Once you've mapped your site, install the Tag Manager container tag on your\n site and deploy it. Read the [installation guidance](https://support.google.com/tagmanager/answer/14842164) for more information.\n3. **Add Events and Variables**\n\n Customize your Google Tag Manager installation using the methods outlined in\n the [events guidance](/tag-platform/devguides/events).\n4. **Configure tags and their associated triggers in Tag Manager**\n\n Once Tag Manager is installed on your site, you should add your site tags to\n the user interface. DO *NOT* publish at this time. Simply add and configure\n the tags from your site in Tag Manager with appropriate tag templates and\n triggers. [Learn more about triggers](https://support.google.com/tagmanager/topic/7679384).\n5. **Final migration swap**\n\n The last step is where you simultaneously swap out your old tags and publish\n your tags in Google Tag Manager. Within a few minutes of each other, you'll\n want to:\n - Remove your site tags in a single code push\n - Once you know this push is successful, press the \"Publish\" button for your container version.\n\n This method might cause a small gap in data, but once the initial swap is\n complete, no more gaps will appear. Alternatively, you could swap the order\n here and publish shortly before your site changes go live. This might cause\n minor, one-time data duplication instead of a small data gap.\n\nAfter you've completed the initial migration to Tag Manager, any subsequent tag\nconfiguration needs can be handled without code changes via the Tag Manager\ninterface."]]