The Customer.io Tag for GTM Server-Side allows you to send events, page views, screen views, user profile updates, and group assignments directly to Customer.io using their Data Pipelines API. This tag supports rich event and user data and handling anonymous IDs automatically.
- Add the Customer.io Tag to your Server GTM container from the Template Gallery or importing the
template.tplfile. - Enter your API Key (found in Customer.io Workspace > Data & Integrations > Customer.io API > Settings).
- Select your Account Region (EU or US) to route requests to the correct endpoint.
- Choose the Action Type:
- Track Event (custom or semantic events)
- Track Page View
- Track Screen View
- Identify User (update user profile traits)
- Add User to Group
- Provide User ID or Anonymous ID (anonymous IDs can be generated and stored automatically via cookie on web).
- Configure relevant event, user, group, page, or screen properties depending on your chosen action.
- Optionally set Consent Settings to only send data when marketing consent is granted.
- (Optional) Enable logging to Console and/or BigQuery for debugging and monitoring.
- For Track Event, you can:
- Use Standard semantic event names from Customer.io's documented list (only for Ecommerce and Mobile App are listed).
- Inherit event names from client events (with partial mapping from GA4).
- Define Custom event names manually.
- API Key — your Customer.io API authentication token.
- User ID or Anonymous ID — one of these must be provided to identify the user.
- Event Name — required when tracking events.
- Group ID — required when adding a user to a group.
- Anonymous ID cookie management: Automatically reads or generates the
ajs_anonymous_idcookie if no user ID is present and option enabled. - Context enrichment: Automatically adds
campaign,page,app,device,network,OS,IP,user agent, andlocaledata. - User and group traits: Merge predefined and custom traits when identifying users or adding them to groups.
- Page and screen view properties: Customize and extend page or screen metadata.
- IP redaction: Optionally redact visitor IP addresses for privacy.
- Optimistic scenario: Option to fire success callback immediately without waiting for API response.
- Detailed logging: Logs request and response details to console and BigQuery for troubleshooting.
The Customer.io Tag for GTM Server-Side is developed and maintained by the Stape Team under the Apache 2.0 license.