Meta Pixel + Google Analytics via GTM

One step at a time. The next step unlocks only after you confirm the current one. Click any code chip to copy it.

Before you start: you need Publish access to the GTM container, admin access to the Meta Business account and Google Analytics, and a way to edit the site’s JavaScript. GTM must already be installed on the site.

Fill in every required field above to unlock the steps.

Common problems

Event is missing in Meta Test events

GTM Preview alone is not linked to Test events. Click Open website on the Test events page and use only the tab it opens.

Events Manager Overview shows nothing

Check the date range (set Last 7 days), allow up to 30 minutes, and scroll down: low-volume custom events sit at the bottom of the list.

A click tag never fires

The button is probably inside a modal that calls stopPropagation(), so GTM never sees the click. Push a dataLayer event from the button itself and use a Custom Event trigger.

Code change is not live

Purge the Hostinger cache (and Cloudflare, if used), then open the script URL in an incognito window and search for the new code.

GA4 event is missing from the Events list

New events take up to 24 hours to appear there. DebugView and Realtime show them immediately.

Warnings you can ignore

SubscribedButtonClick in Meta (automatic event), and the “CSP blocking Google scripts” notice on the WhatsApp page itself.

Copied