Note: Adtriba Core is a legacy feature that we continue to support but no longer sell. The latest version of this feature is available as Funnel Measurement.
If you are already using Funnel Measurement, find more information here. To upgrade, contact us.
Step 1 - Integrate the tracking snippet
If you use single-page applications (SPAs), read this article first.
Add the JavaScript snippet to your web pages to start sending data to Adtriba.
Replace YOUR_PROJECT_TRACKER_ID with the Tracker ID from Adtriba.
Add this snippet to all websites and all webview app pages.
Copy and paste this snippet immediately before the closing </head> HTML tag.
Cross-domains: If the shop flow switches domains, use the cross-domain basic snippet.
If you use a Transparency and Consent Framework (TCF) v2.0 consent management platform (CMP), use the snippet from this article instead.
<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"]);
})();
</script>Step 2 - Track conversions
Track conversions to populate the marketing performance report. Place this JavaScript snippet on the Order Confirmation or Thank You pages on all websites and app webviews.
The basic tracking snippet from Step 1 must run on the same page.
id: Mandatory. The conversion ID.
revenue: Optional but recommended.
currency: Optional but recommended.
Change the conversion name by replacing order with another name (for example transaction).
<script type="text/javascript">
window.adtriba = window.adtriba || [];
window.adtriba.push(["conversion", "Transaction", {
id: "ABCDE123456",
revenue: "49.99",
currency: "EUR"
}]);
</script>Step 3 - Identify users
Use this snippet to identify the user with a unique ID (for example a database ID or email). Use the ID that your systems use internally and across platforms (web and app). Trigger this snippet after the user signs up or logs in, or on all pages where a user ID is available (website and app webview).
<script type="text/javascript">
window.adtriba = window.adtriba || [];
window.adtriba.push(["identity", "john.doe@example.com"]);
</script>You can also provide an encoded ID. In this example, john.doe@example.com is encoded with the SHA-256 hash function. Use a SHA-256 hashing algorithm and a salt.
<script type="text/javascript">
window.adtriba = window.adtriba || [];
window.adtriba.push(["identity", "836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f"]);
</script>Step 4 - Enhanced ecommerce events
Micro events help the attribution algorithm identify which touchpoints increased conversion probability in a customer journey. The last or first touchpoint is not always the most impactful. The touchpoint that drove the highest product engagement may have the greatest impact.
Note: Do not change the event names. Adtriba processes only the exact event names listed below.
Products searched
Add this snippet on a product searched event.
<script type="text/javascript"> window.adtriba = window.adtriba || []; window.adtriba.push(["track", "ProductsSearched"]); </script>
Product viewed
Add this snippet on a product detail view.
<script type="text/javascript"> window.adtriba = window.adtriba || []; window.adtriba.push(["track", "ProductViewed"]); </script>
Product added
Add this snippet on an add-to-cart event.
<script type="text/javascript"> window.adtriba = window.adtriba || []; window.adtriba.push(["track", "ProductAdded"]); </script>
