Step 1 - Integrate Tracking Snippet

Adding the JavaScript snippet to your web pages is the quickest way to start passing data to Adtriba.

Copy and paste this snippet just right before the </head> HTML-tag.

If you are using a TCF v2.0 standardized CMP please use the snippet from this article instead.

<script type="text/javascript">
    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; = id;
        a.src = "";
        s.parentNode.insertBefore(a, s);

    window.adtriba = window.adtriba || [];

Step 2 - Track Conversions

For the marketing performance report, it is necessary to track conversions. Place this JavaScript snippet on the "Order Confirmation" or "Thank You" pages.

<script type="text/javascript">
    window.adtriba = window.adtriba || [];
    window.adtriba.push(["conversion", "Transaction", {
        id: "ABCDE123456",
        revenue: "49.99",
        currency: "EUR"

Step 3 - Identify Users

Use this snippet to identify the user by its unique ID (e.g. database ID or email). Trigger this snippet after the user signed up or logged in.

<script type="text/javascript">
    window.adtriba = window.adtriba || [];
    window.adtriba.push(["identity", ""]);

You can also provide an encoded ID. In this example, we encoded with the SHA-256 hash function.

<script type="text/javascript">
    window.adtriba = window.adtriba || [];
    window.adtriba.push(["identity", "836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f"]);
Did this answer your question?