Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

Google Tag Snippet Generator — gtag.js, GA4, Google Ads and Tag Manager

Enter your GA4 measurement ID, Google Ads ID or Tag Manager container ID and get install code that is ready to paste — with Consent Mode v2 defaults, cross-domain linking, debug mode, manual page views and cookie settings switched on only when you need them.

Aktualisiert am

In the <head>, as high as possible

Right after the opening <body> tag

In Webflow paste the head code in Site settings → Custom code → Head code. Using the cookie banner generator? Put its first snippet above this one.

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: Google Tag Snippet Generator

  1. Choose Google tag to install GA4 or Google Ads directly, or Tag Manager if you manage tags in a GTM container.
  2. Enter your IDs — find the GA4 one in Admin → Data streams, and the container ID at the top of Tag Manager.
  3. Keep Consent Mode v2 defaults on if you show a cookie banner, and add only the options you need.
  4. Paste the head code into every page (Webflow: Site settings → Custom code), publish, and check the Realtime or DebugView report.

What each option adds

  • Consent Mode v2 defaults — gtag('consent', 'default', …) sets ad_storage, ad_user_data, ad_personalization and analytics_storage to denied before any tag runs, with wait_for_update so a banner has time to load. Your banner then calls gtag('consent', 'update', …).
  • Debug mode — debug_mode: true sends events to DebugView in GA4. Turn it off before you go live, or the debug traffic is mixed into reports for a few minutes at a time.
  • Manual page views — send_page_view: false stops the automatic page view, for single-page apps that send page_view on every route change.
  • Cross-domain tracking — linker.domains adds the _gl parameter to links between your domains, so one visit across them stays one session. You also need the domains listed in the GA4 data stream settings.
  • User ID — user_id joins one person’s visits across devices. It must be your own internal ID; Google’s policies forbid sending emails, names or other personal data.

Google tag or Tag Manager?

The Google tag (gtag.js) is the shortest way to add GA4 or Ads to a site. Tag Manager loads a container you edit in its web interface, so marketers can add tags, triggers and pixels without touching the code — the better choice when a site has many tags. Use one or the other for the same GA4 property, not both, or every page view is counted twice. Then send events with the GA4 Event Code Generator and check that tags load with the Tracking Tag Checker.

Auch gesucht als: gtag snippet generator, google tag code generator, ga4 install code, gtag.js code, google tag manager snippet, gtm install code, google ads conversion tag, consent mode default code.

Passende Tools zu: Google Tag Snippet Generator

  • Event Tracking Script Generator — Track button clicks, links and form submits by adding attributes instead of code: data-track="sign_up_click" plus optional data-track-* parameters.
  • Cookie Consent Banner Generator — Add a cookie consent banner to any site — Webflow, WordPress, Shopify or plain HTML — without a paid plugin.
  • UTM Builder — Add utm_source, utm_medium, utm_campaign and friends to any link, see which GA4 channel the visit will land in, and tag a whole list of URLs at once.
  • GA4 Request Decoder — Debug Google Analytics 4 without guesswork.

Häufige Fragen

Where do I find my GA4 measurement ID?
In Google Analytics go to Admin → Data streams, open your web stream and copy the ID that starts with G-.
Can I install both GTM and gtag.js?
You can, but don’t load the same GA4 property in both, or page views are counted twice. If you use Tag Manager, add GA4 inside the container instead.
Does this code respect cookie consent?
With Consent Mode v2 defaults on, Google tags store no cookies until your banner sends a consent update. Without a banner that sends updates, Analytics stays in cookieless mode.
How do I check the tag works?
Turn on debug mode and open Admin → DebugView in GA4, or watch the Realtime report. The Google Tag Assistant browser extension shows every tag a page loads.
Kann ich Google Tag Snippet Generator als Web-App installieren und offline nutzen?
Ja. Google Tag Snippet Generator ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools