GTM Templates
Use Dnomia GTM templates to capture DataLayer events from e-commerce platforms and send them to Dnomia for server-side processing.
Configuration Template
The Config tag initializes Dnomia in your GTM container. Add it as a tag that fires on All Pages.
<!-- GTM Custom HTML Tag: Dnomia Config -->
<script>
(function() {
window.dnomia = window.dnomia || [];
dnomia.push(['init', {
publicKey: '{{Dnomia Public Key}}',
consent: 'pending'
}]);
var s = document.createElement('script');
s.async = true;
s.src = 'https://cdn.dnomia.app/packages/sdk/latest/dnomia.min.js';
document.head.appendChild(s);
})();
</script>Event Template
The Event tag captures DataLayer events and sends them to Dnomia. Create one tag per event type or use a single catch-all.
<!-- GTM Custom HTML Tag: Dnomia Event -->
<script>
window.dnomia = window.dnomia || [];
dnomia.push(['track', '{{Event Name}}', {
orderId: '{{DL - orderId}}',
value: {{DL - value}},
currency: '{{DL - currency}}',
items: {{DL - items}}
}]);
</script>Platform-specific Setup
Ticimax
Ticimax pushes e-commerce events to the DataLayer automatically. Map these events to Dnomia using the GTM Event template.
IdeaSoft
IdeaSoft uses a custom DataLayer format. Use the provided variable mappings for correct event property extraction.
T-Soft
T-Soft DataLayer events follow a different naming convention. Refer to the mapping table for correct event names.
// Ticimax DataLayer Example
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: '12345',
value: 299.90,
currency: 'TRY',
items: [{
item_id: 'SKU-001',
item_name: 'Product Name',
price: 149.95,
quantity: 2
}]
}
});Common Issues
No events firing in GTM
Check GTM Preview mode to verify the DataLayer events are being pushed. Ensure triggers match the exact event name.
Wrong data in events
Verify DataLayer variable paths in GTM. Use the DataLayer inspector to check the actual values being pushed.