Tracking setup: GA4, Tag Manager, Meta Pixel, consent and events

Baza Helper can send every analytics and marketing event from one place. Open it in Baza Helper > Analytics & Verification, in the group SEO & analytics, section Analytics & Tracking. Let only one tool send events: do not run a second analytics plugin (Site Kit, MonsterInsights, a pasted GA snippet) with the same GA4 ID, or every visit is counted twice.

Switch it on

  1. Turn on Enable tracking manager.
  2. Keep Require consent before provider loading on. No provider script loads and no event is sent until the visitor agrees.
  3. Choose the Primary delivery mechanism. Direct: Baza Helper loads GA4, Google Ads, Meta Pixel and Clarity itself. GTM (direct GA4/Ads disabled): only Google Tag Manager loads, and you configure GA4 inside the container.
  4. Save.

Fill in the providers

Only the providers you switch on load.

  • GA4: Enable GA4, then GA4 Measurement ID (G-…). If GA4 already sits inside a GTM container, tick GA4 is already deployed through GTM (disable direct GA4). The tab warns when GA4 is set both ways, because page_view would be sent twice.
  • Google Tag Manager: Enable GTM, GTM Container ID (GTM-…) and Consent category required by this GTM container.
  • Google Ads: Google Ads Conversion ID (AW-…), Google Ads Conversion Label and Google Ads mapped events (comma separated). It loads only after marketing consent.
  • Meta Pixel: Meta Pixel ID. It loads only after marketing consent. Internal events are mapped to Lead, Contact, Schedule, Purchase, ViewContent and CompleteRegistration. An empty mapping means no conversions.
  • Microsoft Clarity: Clarity Project ID. Text and fields are masked by default.

Choose what is measured

  • Track forms automatically sends form_start and form_submit. Contact Form 7, Elementor Forms, WPForms, Gravity Forms, Fluent Forms, Forminator, Formidable, HubSpot and Mailchimp for WP also report form_success, generate_lead and form_error. Search, login, comments and the cart are skipped.
  • Enable scroll-depth events sends how far visitors scroll.
  • Enhanced measurement compatibility: leave it on when GA4’s own enhanced measurement is on, so form, outbound click and scroll events are not sent twice.
  • Consent-based attribution remembers UTM tags and click IDs (first touch, for 30 days) only after analytics consent.

Track any action with a tag

Add data-track-event="my_event" to a button, link or block. The name uses lowercase letters, digits and underscores, up to 40 characters. Optionally add data-track-id="header" to say which one it was. Phone, e-mail and outside links with data-track-id are reported as phone_click, email_click and outbound_click.

From code, call:

ULPTracking.emit( 'my_event', { id: 'header' } )

Allowed parameters are id, context, source, transaction_id, value, currency, service_id, service_name, duration, addons_count, form_id, form_plugin, error_code and percent. Anything else is dropped, and values that contain an e-mail, a phone number or a link are removed. The section Track any action with tags in the tab has a ready prompt for an AI assistant that adds the tags to a page.

With the Baza Helper banner (tab Cookie banner) there is nothing to connect. With another banner, for example one from your theme, run this when the visitor chooses:

document.dispatchEvent( new CustomEvent( 'ulp:consent-request', {
  detail: { analytics: true, marketing: false }
} ) );

You can also call ULPTracking.setConsent( { analytics: true, marketing: false } ). Do this on every page load for a visitor who already chose, too. Without it the consent stays denied and nothing is sent.

  • The page can listen to the ulp:consent event, which fires after consent changed, and read ULPTracking.getConsent().
  • Events fired before consent are dropped, not queued.
  • Custom code that calls gtag() directly must wait: window.gtag exists only after the deferred Baza Helper script has run. Run your code on DOMContentLoaded and check ULPTracking.getConsent().analytics.

Check that it works

  1. Turn on Administrator-only event debugger. A window shows each event and which services would receive it. A tracked click is shown, not counted, and does not leave the page.
  2. Open the site in a private window. Before you choose, the Network tab must show no request to googletagmanager.com, and dataLayer holds only the consent default entry.
  3. Accept analytics. The gtag/js script loads, then config and the first events appear in dataLayer.
  4. In GA4, open Admin > DebugView. Events appear within a few seconds (the debugger turns on debug_mode).
  5. Turn the debugger off when you are done.

A page whose address has a query string that is not a UTM tag or a click ID, for example ?foo=1, sends nothing (a privacy guard). Send purchases from the server after a verified payment, never from the browser alone.

Switch from Site Kit

  1. Set up everything above and check it in DebugView.
  2. Deactivate the Site Kit Analytics module (or the plugin) and delete its snippet.
  3. Check once more that page_view is counted once.
Last Modified: 20.10.2026