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:

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 ToolsContentPages.
  • Select the domain where you want to install Scoby Analytics.
Open Site header HTML in HubSpot settings
  • 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 SettingsTemplate
Edit Template Settings in Hubspot
  • In the popup dialog scroll to Advanced settings
Edit Template Settings in Hubspot
  • 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.

Previous
Shopware

Please note:Scoby does not provide legal advice. The information provided in this documentation is for general informational purposes only and does not constitute legal consultation. You should always consult your legal counsel or Data Protection Officer (DPO) to assess how applicable laws and regulations apply to your specific situation. If your DPO or legal team has questions about Scoby Analytics, they can contact us. We’re happy to provide detailed technical explanations.