Skip to main content
Custom Session Support
János Moldvay avatar
Written by János Moldvay
Updated over 3 years ago

Extend the Integration Snippet with a Custom Session Identifier

<script type="text/javascript">
(function(){
    var id = "adtriba-js";
    var init = document.getElementById(id);

    if (!init) {
        var a = document.createElement("script");
        var s = document.getElementsByTagName("script")[0];
     
        a.setAttribute("data-project-tracker-id", "YOUR_PROJECT_TRACKER_ID");

        a.type = "text/javascript";
        a.async = true;
        a.id = id;
        a.src = "https://cdn.adtriba.com/v2/adtriba.js";
        s.parentNode.insertBefore(a, s);
    }

    window.adtriba = window.adtriba || [];
    window.adtriba.push(["pageview"]);
    window.adtriba.push(["session", "CUSTOM_SESSION_ID"]);
})();
</script>
Did this answer your question?