Google Tag Manager
Documentation pages
This documentation applies to FormSignal 1.0.0.
Choose Through Google Tag Manager (dataLayer push) as the path of a destination when your tags are managed in Tag Manager. You can mix paths: for example GA4 through Tag Manager and Meta direct. Each destination uses one path only.
What FormSignal does
For each action, FormSignal makes one dataLayer.push that covers every destination on the Tag Manager path. Your container decides which tags fire.
FormSignal pushes only when a Tag Manager container is on the page: the container is loaded, or the container snippet has already pushed gtm.js to the dataLayer. Until then, the action waits in the queue for at most 30 minutes. See Consent.
On this path, "passed to the tracking script" means FormSignal pushed the event to the dataLayer. Whether a tag fires, and what it sends, depends on your container and its consent settings. FormSignal cannot see that.
The dataLayer contract
dataLayer.push({
event: 'formsignal_event',
fs_event_name: 'generate_lead', // or 'contact_click', or your own names
fs_action_id: '…', // action ID
fs_kind: 'form', // 'form' or 'click'
fs_destinations: ',ga4,ads,meta,', // destinations on this path that may receive this action
fs_ga4_id: 'G-…',
fs_ads_send_to: 'AW-123456789/AbCdEf',
fs_ads_conversion_id: '123456789',
fs_ads_conversion_label: 'AbCdEf',
fs_meta_pixel_id: '123456789012345',
fs_meta_event: 'Lead', // 'Lead' or 'Contact'
lead_type: 'form',
contact_method: undefined,
lead_page: 'page-42-contact',
lead_placement: 'content',
form_id: 'a1b2c3d',
form_name: 'contact'
});
| Key | Value |
|---|---|
event |
Always formsignal_event. |
fs_event_name |
The event name from the Destinations screen: generate_lead for forms and contact_click for clicks by default. With "Use the lead event for contact clicks" on, clicks also use the form event name. |
fs_action_id |
The action ID. For forms, a UUID made by your server. For clicks, an ID made in the browser. |
fs_kind |
form or click. |
fs_destinations |
The destinations on the Tag Manager path that this push is for, wrapped in commas: ,ga4,, ,ga4,meta,, ,ga4,ads,meta,. A trigger can test "contains ,ga4,". A destination is left out when FormSignal does not pass the action to it in this push: consent blocks it, it does not take contact clicks, or it was already passed this action. |
fs_ga4_id |
The GA4 measurement ID, when ga4 is in fs_destinations. |
fs_ads_send_to |
AW-<ID>/<label>, when ads is in fs_destinations. The per-form conversion from the Elementor widget, when set. |
fs_ads_conversion_id |
The digits of the AW- ID, without AW-. |
fs_ads_conversion_label |
The conversion label. |
fs_meta_pixel_id |
The Pixel ID, when meta is in fs_destinations. |
fs_meta_event |
Lead for forms. Contact for clicks, or Lead with "Use the lead event for contact clicks" on. |
lead_type |
form for forms. For clicks, only with "Use the lead event for contact clicks" on: phone, email or whatsapp. |
contact_method |
For clicks: phone, email or whatsapp. |
lead_page |
See Google Analytics 4. |
lead_placement |
header, footer, popup or content. |
form_id |
Elementor widget ID, forms only. |
form_name |
Form label or Form Name, forms only. |
Every key is present in every push. Keys that do not apply have the value undefined. Google documents that a later push with the same variable name overwrites the earlier value. Pushing every key each time means a value from an earlier FormSignal push is not reused by mistake.
The Diagnostics test event also pushes formsignal_event, with fs_event_name: 'formsignal_test', fs_kind: 'test' and fs_destinations: ',ga4,' (or ',' for Meta). The imported Google Ads trigger never matches it.
Importing the container file
The plugin ships gtm/formsignal-gtm-container.json.
- In Tag Manager, go to Admin → Import Container.
- Click Choose container file and select
formsignal-gtm-container.json. - Choose a workspace: New (recommended, so you can review) or Existing.
- Choose Merge. Do not choose Overwrite: Google documents that Overwrite removes all your existing tags, triggers and variables.
- For items with the same name but different contents, choose to rename the new ones, unless you are importing a newer FormSignal file over an older one; then choose to overwrite them.
- Click Continue, review the preview (View Detailed Changes lists each item), then click Confirm.
- Test in preview mode, then publish.
Review each item after import.
Tested with a real container (17 November 2026)
The file from FormSignal 0.9.2 was imported into a real web container with Merge and "rename conflicting" (3 tags, 3 triggers and 14 variables accepted) and published. The container had no Google tag of its own. The container was then put on a public test site with Google’s current container snippet (one gtm.js?id=GTM-… script in <head>, from https://support.google.com/tagmanager/answer/14847097), no other Google tag on the page, Complianz for consent, GA4 on the Tag Manager path. Checked in Chromium and WebKit:
- A form gave one
formsignal_eventpush and one GA4 collect request withgenerate_lead, the GA4 ID from the push astidand the five parameters (lead_type,lead_page,lead_placement,form_id,form_name). A phone click gave one push and onecontact_clickwithcontact_method,lead_pageandlead_placement. - With no Google tag in the container, the "FS - GA4 event" tag still sent. Observed, not documented: at the first event the tag loaded
gtag/destination?id=<GA4 ID>, then sent apage_viewto that ID, then the event; afterwards the page’s automatic events (scroll,user_engagement) went to it too. So pages where a visitor sends a form or clicks get a page view in GA4, and other pages do not. If you want page views on every page, add a Google tag to the container (Google’s step "Add the Google tag in Google Tag Manager"). - Consent checks on the tag (additional consent
analytics_storage):- no Consent Mode on the page: the tag fired;
- Consent Mode default "denied" (consent given in the banner, so FormSignal pushed): the tag did not fire, and nothing at all was requested from Google;
- after
gtag('consent', 'update', {analytics_storage: 'granted', …}): the earlier form was not sent afterwards; the next event (a phone click) fired the tag, withgcs=G111.
- On the Tag Manager path FormSignal reports "passed" when it pushed, also when the tag then did not fire because of its consent check. Diagnostics says so ("Tag Manager sends it, check in Tag Assistant").
- The home page check showed "Tag Manager on the home page: Yes. Container: GTM-…" and the guided setup proposed the Tag Manager path for GA4.
- The Meta tag ("FS - Meta Pixel trackSingle"), with the Pixel base code on the page and consent given: one
Leadrequest to Meta witheventIDequal to the action ID,lead_pageandlead_placement. See Consent.
Not tested: the Google Ads conversion tag of the file (no Ads account was used), the old two-part container snippet, Tag Assistant preview mode.
What the file contains
14 Data Layer variables (version 2): FS - event name, FS - action_id, FS - destinations, FS - GA4 ID, FS - Ads conversion ID, FS - Ads conversion label, FS - Meta pixel ID, FS - Meta event, FS - lead_type, FS - contact_method, FS - lead_page, FS - lead_placement, FS - form_id, FS - form_name.
3 triggers, all of type Custom Event with event name formsignal_event:
| Trigger | Condition |
|---|---|
| FS - to GA4 | FS - destinations contains ,ga4, |
| FS - to Google Ads | FS - destinations contains ,ads, |
| FS - to Meta | FS - destinations contains ,meta, |
3 tags, each firing once per event:
| Tag | Type | What it sends | Additional consent check |
|---|---|---|---|
| FS - GA4 event | Google Analytics: GA4 Event | Event name {{FS - event name}}, measurement ID {{FS - GA4 ID}}, parameters lead_type, contact_method, lead_page, lead_placement, form_id, form_name |
analytics_storage |
| FS - Google Ads conversion | Google Ads Conversion Tracking | Conversion ID, conversion label, order ID {{FS - action_id}} |
ad_storage, ad_user_data |
| FS - Meta Pixel trackSingle | Custom HTML | fbq('trackSingle', <Pixel ID>, <Lead or Contact>, {lead_page, lead_placement}, {eventID: <action ID>}), only if fbq exists |
ad_storage |
Differences from the direct path:
- The imported Meta tag sends
lead_pageandlead_placementonly. The direct path also sendslead_typeorcontact_method. Edit the tag if you want them. - The Meta tag does nothing when the Meta Pixel base code is not on the page. FormSignal still reports the action as passed, because it pushed it to the
dataLayer. - The Meta tag does not send the Diagnostics test event.
Conversion Linker
If you send Google Ads conversions through Tag Manager, check that your container has a Conversion Linker tag on all pages. Google documents that it stores ad click information so conversions can be measured, and that it is not needed when the container already loads a Google tag on every page. The import file does not include one.
Consent checks on the tags
Google documents two kinds of consent settings on a tag (Advanced Settings → Consent Settings):
- Built-in consent checks: Google tags that support consent mode change their behaviour based on the consent state.
- Require additional consent for tag to fire: the tag fires only if every listed consent type is
grantedwhen the tag is triggered.
The imported tags use additional consent checks: analytics_storage for GA4, ad_storage and ad_user_data for Google Ads, ad_storage for Meta. With these checks, a tag that is triggered while consent is not granted does not fire for that event.
FormSignal applies its own rules before the push. See Consent:
- For GA4 and Google Ads, a Google consent mode "denied" state does not stop the push. The container’s consent checks decide.
- For Meta, a Google consent mode
ad_storage"denied" state removesmetafromfs_destinations. - A "not granted" state from the WP Consent API removes the destination from
fs_destinationsfor that action, for good.
Change the additional consent checks only if your consent setup needs it, and test the result in preview mode.
Checking
- Open the container in preview mode, send a form logged out (or use test mode), and check that
formsignal_eventappears and the right tags fire. - Diagnostics → Send test event pushes a test event for GA4 on this path. Diagnostics then shows "Unknown: Tag Manager sends it, check in Tag Assistant" in the "Request seen in the browser" column, because FormSignal does not watch what the container sends.