Integrate
Add a small script to pages that show click-to-call numbers, then send call records from your phone system. Calltag does not implement a cookie banner.
Public vs secret keys
Create keys under Settings → API keys.
- Public (
ct_pk_) — website tag only: click events, optional code issue, tag config. Add your website origin to the allowlist. Rate-limited. Not a password; still do not put it in a secret store as if it were one, and never use it to change account settings. - Secret (
ct_sk_) — phone system and servers: push calls, list calls, resolve IVR codes. Shown once at creation. Never place it in GTM, the page, or the tag.
Website tag (GTM)
Serve ct.js from your Calltag host (or copy the file to your own HTTPS origin in the EU). In Google Tag Manager, use Custom HTML and fire it only when your CMP allows the same class of tags as other marketing scripts.
<script src="https://YOUR_CALLTAG_HOST/ct.js" data-key="ct_pk_YOUR_PUBLIC_KEY" data-endpoint="https://YOUR_CALLTAG_HOST" async ></script>
The tag creates a first-party visitor id, listens for tel: clicks, and sends them when the visitor taps a number. Optional: attribute data-ct-render-codes=true to show a one-time code next to numbers in code mode; calltag.requestCode(number, attributes) for a custom UI; calltag.setAttributes for opaque ids (session or customer reference — not access tokens). You do not need the tag on pages with no phone numbers. Full GTM attributes and SPA notes: docs/integrations/tag-gtm.md in the Calltag repository.
Consent
Keep consent in your CMP and GTM. Calltag stores what the tag and your connectors send; it does not block or unblock the script for you.
Call records: pick a source
- CSV — Imports: upload a CDR file, confirm column mapping, commit. Encoding and delimiter are detected. Needed fields: called number and start time.
- fonial — Integrations: main-account username and password. Ask fonial to unlock the HTTP API. Calltag polls the journal.
- sipgate — Integrations: personal access token. Classic history and sipgate Neo channel events are both supported. sipgate.io webhooks are not in this version.
- Amazon Connect — You deploy a stack in your AWS account (EU, Frankfurt recommended). Contact records are pushed to Calltag. Calltag never stores your AWS keys. Optional IVR Lambda for code entry.
- Generic push —
POST /api/v1/callswith a secret key. Idempotent on your call id. Use for other PBXs or a custom bridge.
Repository guides: docs/integrations/ (CSV, fonial, sipgate, Amazon Connect, code-based IVR) and docs/api/README.md.
Then configure numbers and matching in Admin.