Framework Guides

Acquia

Install the Ours Privacy Web SDK on a Drupal site hosted on Acquia Cloud, including how the deployment workflow differs from self-hosted Drupal.

Use this page to install the Ours Privacy Web SDK on a Drupal site hosted on Acquia Cloud.

Acquia hosts Drupal rather than replacing it, so the way you add the snippet is the Drupal way. What changes is how the code reaches production.


Steps to Integrate Ours Privacy with Acquia

1. Copy your install snippet

Copy your install snippet from the Install Ours page.

2. Add the snippet in Drupal

Follow the Drupal guide to add the snippet, either through a module that manages head assets or by attaching it in your theme.

3. Deploy through Acquia Cloud

Acquia Cloud does not offer a head-script field in its own interface. Changes are committed to your repository and deployed to an environment.

  1. Commit the change to your repository.
  2. Deploy to a lower environment first and confirm the snippet renders.
  3. Deploy to production through your normal Acquia Cloud workflow.

If you use Acquia Code Studio or a pipelines-based workflow, the snippet ships along with any other code change, so no additional configuration is needed.

4. Clear caches and verify

  1. Clear the Drupal cache, then purge the Acquia CDN or Varnish cache for the affected paths.
  2. Load a page and view the page source to confirm the snippet is present.
  3. Open the browser console to check for script errors.
  4. In your Ours Privacy account, check Recent Events to confirm page views are arriving.

Important: Acquia layers caching in front of Drupal. A missing snippet after deployment is usually a stale cache rather than a failed change. Purge before troubleshooting the code.


Track Custom Events

Call ours('track', ...) from a theme template or an attached script:

ours('track', 'Form Submitted', { form_name: 'contact_us' });

Next Steps

If you need further assistance, contact us at support@oursprivacy.com.

How is this guide?

On this page