Skip to main content

Setup Analytics

Implementing tracking on your marketing website or application is the foundational step in understanding user behavior. This setup is crucial as it enables further tracking functionalities such as form tracking and integrations with other platforms.

Tracking Methods

Tracking can be implemented in two primary ways:

  • Client Side:

    • JavaScript Script: This method involves injecting a script directly into your website. It is straightforward and suitable for most use cases, particularly if you are not heavily reliant on server-side operations.
    • JavaScript SDK: When your site is a SPA, our recommend approach is to use our NPM package and creating Analytics instances.
  • Server Side (Advanced): This approach combines client-side tracking with the capability to send events directly from your server to our analytics backend using the SDK. This method is more complex and generally requires a dedicated engineering team to implement. It is particularly beneficial for enhanced data security and reliability, as it minimizes exposure to client-side interruptions like ad blockers.

If you are not implementing our script via GTM and your CMP (Consent Management Platform) is not compatible with Google Consent Mode v2, you must follow your CMP provider’s official documentation to implement Dreamdata. In short, it is your responsibility to ensure the script tracks users in compliance with your CMP’s rules. If you are a non-technical person and unsure how to integrate scripts with your CMP, we strongly recommend involving a developer — the process typically takes no more than 30–60 minutes.

What Our Analytics Script Does

Our analytics library provides comprehensive tracking capabilities:

Core Tracking

  • Page Views: Automatically tracks all page views on your website, providing insights into user navigation patterns
  • Custom Events: Track any custom events using the track() method
  • User Identification: Identify users and associate their actions using the identify() method

Data Enrichment & Intent Sources

Integrate with B2B intent data providers. Enable specific sources or use autoGroup.

Form Tracking

Automatically detects and tracks form submissions: HTML forms, dynamic forms, popular form builders, with custom configuration options.

Privacy & Compliance

  • IP anonymization for GDPR
  • Cookie-less anonymous tracking
  • Consent management support
  • Granular cookie control

Google Consent Mode V2 is a requirement for sites that are used by EEA or UK users to make sure that google tags read the user’s consent. Practically speaking, it's a set of fields that need to be updated when user interacts with the Cookie Management Platform on a site.

The relevance to Dreamdata is that our script is aligned with Google Consent Mode V2 requirements. Therefore our script looks for the field update in analytics_storage to know when to fire the standard tracking script vs. cookieless tracking. This field needs to be correctly updated by user interaction with the cookie banner from your cookie management platform (CMP). Google Consent Mode V2 should be enabled for all Dreamdata customers who are using our analytics, regardless of region, as it's the easiest way to ensure seamless interaction between your cookie banner and our script.

The expected behavior is:

  • It should be true after user accepts cookies, triggering the standard script.
  • It should be false or undefined if the user rejects cookies, we expect the same behavior in both cases, which is that the cookieless script fires.

You can see the documentation on how to enable Google Consent Mode V2 in this list:

  • CookieBot - Google Consent Mode implementation
  • CookieYes - Consent Mode with CookieYes
  • OneTrust - Google Consent Mode v2 setup
  • Osano - Consent Mode v2 configuration
  • Hubspot - Google Consent Mode v2 setup
  • Cookie Information now supports Google Consent Mode V2 by default. However, if you have an older implementation of the banner you can follow this guide to enable it.
  • Framer cookie banner is complaint with Google Consent Mode V2 by default.

If your Cookie Management Platform is not included in this list you can search for it online to find the instructions for where to find your setting for Google Consent Mode V2.

This field is update in analytics_storage. You can find this on your site by logging window.google_tag_data in the console, and looking inside the ics > entries > analytics_storage > update object.