=2&&(t.version=a[1]);var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(r,n)},["init","ready","setDefaultConsent","updateConsent","trackPageview","identify","trackLeadCreation","trackUserCreation","trackSearch","trackViewItem","trackAddToCart","trackBeginCheckout","trackAddPaymentInfo","trackPurchase","trackTrialStart","trackSubscriptionStart","trackEvent"].forEach(function(e){t[e]=function(){var a=Array.prototype.slice.call(arguments);"init"===e?t.initArgs=a:"setDefaultConsent"===e?t.defaultConsentArgs=a:(a.unshift(e),t.buffered.push(a))}}),t.buffered=[]}}() datahappy.l"> =2&&(t.version=a[1]);var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(r,n)},["init","ready","setDefaultConsent","updateConsent","trackPageview","identify","trackLeadCreation","trackUserCreation","trackSearch","trackViewItem","trackAddToCart","trackBeginCheckout","trackAddPaymentInfo","trackPurchase","trackTrialStart","trackSubscriptionStart","trackEvent"].forEach(function(e){t[e]=function(){var a=Array.prototype.slice.call(arguments);"init"===e?t.initArgs=a:"setDefaultConsent"===e?t.defaultConsentArgs=a:(a.unshift(e),t.buffered.push(a))}}),t.buffered=[]}}() datahappy.l"> =2&&(t.version=a[1]);var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(r,n)},["init","ready","setDefaultConsent","updateConsent","trackPageview","identify","trackLeadCreation","trackUserCreation","trackSearch","trackViewItem","trackAddToCart","trackBeginCheckout","trackAddPaymentInfo","trackPurchase","trackTrialStart","trackSubscriptionStart","trackEvent"].forEach(function(e){t[e]=function(){var a=Array.prototype.slice.call(arguments);"init"===e?t.initArgs=a:"setDefaultConsent"===e?t.defaultConsentArgs=a:(a.unshift(e),t.buffered.push(a))}}),t.buffered=[]}}() datahappy.l">
Server integration – Datahappy
Event/property names reference – Datahappy
<script>
!function(){var t=window.datahappy=window.datahappy||{};if(!t.initialized){if(t.invoked){console.error("[datahappy] snippet included multiple times");return}t.invoked=!0,t.load=function(e){var a=(e=e||"<https://cdn.datahappy.co/sdk/v0.7/datahappy.js>").match(/.+sdk\\/v?(.+)\\/datahappy.js/);null!==a&&a.length>=2&&(t.version=a[1]);var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(r,n)},["init","ready","setDefaultConsent","updateConsent","trackPageview","identify","trackLeadCreation","trackUserCreation","trackSearch","trackViewItem","trackAddToCart","trackBeginCheckout","trackAddPaymentInfo","trackPurchase","trackTrialStart","trackSubscriptionStart","trackEvent"].forEach(function(e){t[e]=function(){var a=Array.prototype.slice.call(arguments);"init"===e?t.initArgs=a:"setDefaultConsent"===e?t.defaultConsentArgs=a:(a.unshift(e),t.buffered.push(a))}}),t.buffered=[]}}()
datahappy.load()
datahappy.init("<project-id-here>", { integrations: { gtm: {} } })
datahappy.trackPageview()
</script>