E-Commerce Platforms
Installing Scoby Analytics on BigCommerce
Like all Scoby integrations, this lightweight, client-side integration is carefully designed to prioritize visitor privacy. It fully complies with EU ePrivacy and GDPR regulations, while enabling you to exercise your legitimate interest in understanding how your website is being used.
Prerequisites
Before you begin, make sure you have:
- A Scoby Analytics Workspace
- Your Workspace ID
- Administrator access to your BigCommerce store
Installation Guide
You’ll set up Scoby Analytics using BigCommerce Script Manager, which allows you to inject scripts into storefront pages without editing theme files.
Logging Page Views
Log in to your BigCommerce Admin.
Go to Storefront → Script Manager.
Click Create a Script.
Fill in the fields as follows:
- Name:
Scoby Analytics
- Description:
Cookieless, GDPR-compliant analytics by Scoby
- Location on page:
Header
- Select pages where script will be added:
All Pages
- Script type:
Script
- Script contents: paste the code below (replace
<WORKSPACE_ID>
with your Workspace ID):
- Name:
<script>
(function () {
const workspaceId = "<WORKSPACE_ID>";
window.scoby = window.scoby || function () {
(window.scoby.q = window.scoby.q || []).push(arguments);
};
window.scoby('init', { autoLogging: false });
// Log page views
document.addEventListener('DOMContentLoaded', function () {
const url = window.location.href;
const referrer = document.referrer;
window.scoby('logPageView', { url, referrer });
});
// Load Scoby script
const script = document.createElement('script');
script.src = `https://${workspaceId}.s3y.io`;
document.head.append(script);
})();
</script>
- Click Save.
Logging Conversions
BigCommerce provides special variables on the order confirmation page that let you access order totals and currency values.
In Script Manager, click Create a Script again.
Fill in the fields as follows:
- Name:
Scoby Analytics – Conversion
- Description:
Logs purchases to Scoby Analytics
- Location on page:
Footer
- Select pages where script will be added:
Order Confirmation Page
- Script type:
Script
- Script contents: paste the code below (replace
<WORKSPACE_ID>
with your Workspace ID):
- Name:
<script>
(function () {
const workspaceId = "<WORKSPACE_ID>";
window.scoby = window.scoby || function () {
(window.scoby.q = window.scoby.q || []).push(arguments);
};
// BigCommerce exposes order data in the "order" variable
document.addEventListener('DOMContentLoaded', function () {
if (window.order && order.total_inc_tax) {
const amount = order.total_inc_tax;
const currency = order.currency && order.currency.code ? order.currency.code : '';
const goal = "Purchase";
window.scoby('logConversion', { goal, amount, currency });
}
});
const script = document.createElement('script');
script.src = `https://${workspaceId}.s3y.io`;
document.head.append(script);
})();
</script>
- Click Save.
That’s it 🎉
Scoby Analytics is now collecting privacy-friendly, aggregated analytics data from your BigCommerce store — fully in line with EU GDPR and ePrivacy.