B2B Marketing & CRM Tools
Installing Scoby Analytics on HubSpot CRM
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 HubSpot account
Installation Guide
Follow the steps below to anonymously count page views and (optionally) conversions such as purchases, sign ups or form submissions.
Logging Page Views
- Log in to your HubSpot account.
- In the top-right corner, click the ⚙️ Settings icon.
- In the left sidebar menu, go to Tools → Content → Pages.
- Select the domain where you want to install Scoby Analytics.

- Paste the following code into the Site header HTML field.
Replace<WORKSPACE_ID>
with your actual Scoby Workspace ID.
<script>
(function () {
const workspaceId = "<WORKSPACE_ID>";
window.scoby = window.scoby || function () {
(window.scoby.q = window.scoby.q || []).push(arguments);
};
const script = document.createElement('script');
script.src = `https://${workspaceId}.s3y.io`;
document.head.append(script);
})();
</script>
- Click Save in the lower left corner to apply your changes.
From now on, all HubSpot-hosted pages under this domain will send anonymous pageview data to Scoby Analytics.
Logging Conversions
If you’d like to log form submissions, purchases, or other conversions, you can call the Scoby API in HubSpot’s Custom HTML modules, Thank You pages, or Form options.
For example, to log a purchase or sign-up on a Thank You page:
- Setup your form to redirect to a custom Thank You page.
- Edit the Thank You page in HubSpot.
- Go to Settings → Template

- In the popup dialog scroll to Advanced settings

- Paste the following code snippet and adjust the
goal
as needed:
<script>
window.scoby('logConversion', {
goal: 'Sign Up',
});
</script>
- Close the dialog and click Save at the top right to apply your changes.
💡 You can also trigger
logConversion
after a successful form submission using HubSpot’s form event callbacks in custom code modules.
Done 🎉
Scoby Analytics will now start collecting anonymous visit and (optionally) conversion data from your HubSpot site. Shortly after installation, you can view your live statistics in the Scoby Analytics Dashboard.