Custom dimensions let you add your own context to a visit, such as a customer type, a logged-in state or an A/B variant. You can then filter and segment your Exatom reports by that context.
Add this snippet to your website, or to a Custom HTML tag in Google Tag Manager, after the Exatom tag. Replace customer_type and returning with your own key and value.
<script>
(function () {
function sendDimension () {
window.Exatom?.trackDimension?.('customer_type', 'returning')
}
if (window.Exatom?.initialized) {
sendDimension()
} else {
document.body.addEventListener('ExatomPageview', sendDimension, { once: true })
}
})()
</script>If you are sure the Exatom tag has already loaded, for example inside a click handler, one line is enough:
window.Exatom?.trackDimension?.('customer_type', 'returning')+ _ - ( ) { } [ ] ; : , . ? ! @ # $ % ^ * ~ / |= & < > ' " and accented letters such as é or ü.