Extend the Integration Snippet with the Cross Domain Option

Define the "data-project-cross-domain" option in the configuration block with the required domain name.

<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.setAttribute("data-project-cross-domain", "my-project.com");
     
        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"]);
})();
</script>

If you have more than one domain, just enter them as a comma separated list.

<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.setAttribute("data-project-cross-domain", "my-project-a.com,my-project-b.com,my-project-c.com");
     
        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"]);
})();
</script>
Did this answer your question?