Skip to content

Install TagALead on a client.

Three steps in the app, about ten minutes, no developer and no DNS.

Installing TagALead on one client takes three steps in the app: add the container, install the template, verify. You need edit and publish access to the client's GTM web container. Nothing changes in the site's code and no DNS record is needed.

1. Add the container

In TagALead, create the client, then enter its GTM container ID (GTM-XXXXXXX), an optional label and every domain the site runs on. TagALead accepts beacons only from these domains; www. counts as the same host, and other subdomains are added separately.

2. Install the template

  1. Copy the client's API key from the Install step, or later from Settings → API key. It starts with tal_ and is public: it identifies the client and grants no read access.
  2. Download the template (tagalead-conversion-logger.tpl) and import it in GTM under Templates.
  3. Create a tag from the template and paste the API key. Leave Ingest URL at https://s.tagalead.com.
  4. Give the tag two triggers: Initialization – All Pages, which loads the capture script early, and a Custom Event trigger with the event name .* and Use regex matching on, so the tag sees every GTM event.
  5. Mark each conversion tag: in the tag's Advanced Settings → Additional Tag Metadata, tick Include tag name and add the key type with the value conversion. Or list the tag IDs in the template's Tag IDs field.
  6. Recommended: create a Google Tag: Event Settings variable with lead_id, lead_name, lead_email, value, currency and transaction_id, and select it in the template's Event settings variable field. Every other scalar key in that variable is sent as an event parameter. What the site pushes shows where the values come from.
  7. Leave Consent state variable empty to use GTM's ad_storage consent state. Select a variable only if the site stores consent somewhere else; it must return granted, denied or unknown.
  8. Publish the container.

3. Verify

Submit a test lead on the site. Every two seconds the Verify step checks that:

  • a request arrives with a valid API key,
  • its domain is on the allowed list,
  • a conversion tag fire is logged.

When all three pass, the first event appears.

Nothing after a few minutes?

  • The container is published, not only saved.
  • Both triggers are on the tag.
  • The metadata key and value are type and conversion.
  • The API key and the container ID belong to this client.
  • Ad blockers and private windows are off while you test.

New settings can take up to a minute to reach TagALead.

What the site pushes to the dataLayer

The template takes the lead from the Event settings variable of step 2.6, so the site has to make those six values available in GTM. The usual way is to push them to the dataLayer with the conversion event, then map each key in the Event Settings variable to a Data Layer Variable of the same name.

window.dataLayer = window.dataLayer || []
window.dataLayer.push({
  event: 'contact_form_submit',
  lead_id: 'L-20416',
  lead_name: 'Daniel Ortiz',
  lead_email: 'daniel.ortiz@example.com',
  value: 150,
  currency: 'EUR',
  transaction_id: 'T-20416',
})
KeyWhat it is
lead_idYour own ID for the lead, such as the CRM record.
lead_nameThe visitor's name.
lead_emailThe visitor's email address.
valueThe conversion value.
currencyThe currency of the value, as a code such as EUR.
transaction_idAn ID that is unique to this conversion.

Name and email follow the visitor's consent. When ad storage is denied, the template drops the name, the email and every click ID from the lead, and still sends the lead ID. Push the lead ID on every lead, with or without consent. Any other scalar key in the Event Settings variable is sent as an event parameter, up to 30 per event.

Server-side GTM

A separate template for the server container records the HTTP status each platform returned. It goes into the server container beside your existing tags; the web template stays as it is.