GTM Setup Guide
Learn how to set up Google Tag Manager with GetCapi for server-side tracking
Quick Start: Download Pre-configured Server Container
Download a ready-to-use GTM server container with the GetCAPI Client pre-configured. Import it into your server container and you're ready to go.
Purchase Events
Track completed transactions
Add to Cart
Track cart additions
Page Views
Track all page visits
Click IDs
Capture fbclid, gclid, etc.
Go to your container in GetCapi
Navigate to your container's detail page
Click the GTM tab
Find the GTM setup section
Download the container JSON
Click the download button to get your configured container
What's included in the download?
- GetCAPI Client template for server-side event handling
- Container ID pre-configured
- Header enrichment enabled for IP and User Agent
- a
Open Google Tag Manager
Go to tagmanager.google.com and select your server container
- b
Go to Admin
Click the Admin tab in the top navigation
- c
Import Container
Under Container section, click 'Import Container'
- d
Configure Import Settings
Choose workspaceDefault WorkspaceChoose an import optionMergeWhen conflictingRename conflicting tags - e
Confirm Import
Click 'Confirm' to import the container
Enable GTM Preview Mode
Click 'Preview' in GTM to enter debug mode
Visit Your Website
Open your website in a new tab
Trigger Test Events
Add a product to cart and complete a test purchase
Check GTM Debug Panel
Verify GetCapi tags fire on the correct events
Check GetCapi Logs
View incoming events in your GetCapi dashboard
Review Changes
Click 'Submit' in GTM to review your changes
Add Version Name
Name your version (e.g., 'Added GetCapi tracking')
Publish
Click 'Publish' to make changes live
You're all set!
Your GTM container is now configured to send events to GetCapi. Events will be forwarded to your connected platforms.
Use this tool to verify your GTM container is correctly installed on your website.
Purchase Event
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'T12345',
value: 99.99,
currency: 'USD',
items: [
{
item_id: 'SKU123',
item_name: 'Blue T-Shirt',
price: 29.99,
quantity: 2
}
]
}
});Add to Cart Event
dataLayer.push({
event: 'add_to_cart',
ecommerce: {
currency: 'USD',
value: 29.99,
items: [
{
item_id: 'SKU123',
item_name: 'Blue T-Shirt',
price: 29.99,
quantity: 1
}
]
}
});With User Data (Enhanced Matching)
Include user data for better match rates on ad platforms. Data is automatically hashed before sending.
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'T12345',
value: 99.99,
currency: 'USD',
items: [...]
},
user_data: {
email: 'customer@example.com',
phone: '+1234567890',
first_name: 'John',
last_name: 'Doe',
city: 'New York',
state: 'NY',
country: 'US',
zip: '10001'
}
});No events appearing in GetCapi?
- Check that GTM preview mode shows tags firing
- Verify your container URL is correct
- Make sure your domain is properly configured
- Check browser console for any errors
Missing ecommerce data?
- Verify dataLayer format matches GA4 ecommerce spec
- Check that ecommerce object exists before GetCapi tag fires
- Use GTM's Variable debugger to inspect values
Seeing duplicate events?
- Check for multiple GetCapi tags firing on same event
- Enable deduplication in your integrations settings