Getting Started

Understanding The Event Flow

Learn how events are tracked, filtered, customized, and forwarded through Ours Privacy, from pixel script to destinations and debugging in the Ours platform.

Understanding The Event Flow

The Ours Privacy platform processes events in a structured and secure manner to ensure that your data is tracked, filtered, and forwarded to the correct destinations. This guide will show you how events flow through the system, from their source to their final destination.


Event Flow Overview

Here’s a high-level view of the event flow in Ours Privacy:


Step 1: The Source

What is a Source?

A source is where your data originates. Ours Privacy supports multiple types of sources, including:

  • Pixel Script: You can install this on your website (potentially via GTM) to track user interactions automatically or via custom events.
  • Server API Integration: You can use this to track events directly from your backend systems. See Server API Integration.
  • Webhooks or APIs: These are custom sources that you can use to feed data into Ours Privacy.

The pixel script is one of the most common and straightforward sources. When installed on your website, it automatically tracks default properties (e.g., UTM parameters, referrers) and allows you to track custom events with the ours('track') function.

How the Pixel Script Works

  1. The pixel script is installed in the <head> section of your website.
  2. It initializes a global function, ours, which you use to track events.
    ours('track', 'Your Event Name');
  3. As users interact with your site, the script sends event data (e.g., page views, form submissions) to Ours Privacy.

To learn more about installing the pixel script, see Installation.

Map in the ours_user_id when needed

For non-web SDK sources (e.g., API, Webhook, etc) make sure that the ours_user_id is present in the inbound payload to help stitch the users session and attribution data back to that event. When present, navigate to the Custom Mappers section in the source to tie the ours_user_id into the payload. If that option isn't present, then the Source will automatically tie it into the payload when present.


Step 2: Event Allowlist

After an event is received from a source, Ours Privacy checks whether it is on your Event Allowlist. This ensures that only approved events are processed and sent to destinations.

Key Points:

  • Events that are not allowlisted for a specific destination will not be forwarded to that destination.
  • You can manage your Event Allowlist in the Event Allowlist section of the Ours app.

For more details, see Adding Events to Your Allowlist.

Note: Make sure the source is enabled within that Destinations settings tab. Even if the event is enabled in the Allowlist, if the source is not connected to the destination, then it will not work.


Step 3: Optional Custom Mapper

Before forwarding events to destinations, Ours Privacy allows you to customize the data through a mapper. Mappers enable you to:

  • Modify event properties (e.g., rename, transform, or redact data).
  • Append static data based on conditional logic (e.g., item_name contains "services" then value = 10).
  • Apply privacy rules, such as hashing or removing PII/PHI.
  • Customize how data is formatted for specific destinations.
  • Stop dispatch based on selected criteria.

If you do not configure a custom mapper, Ours Privacy uses default mappings to forward your event data.

For more details, see Data Mapping.


Step 4: Destinations

Once the event passes through the mapper, it is forwarded to your configured destinations. Destinations can include:

  • Analytics platforms (e.g., Google Analytics, Mixpanel).
  • Advertising platforms (e.g., Google Ads, Facebook Ads).
  • Big data tools (e.g., Amazon S3, Google BigQuery).

To configure destinations, refer to the Destinations Overview.



Summary

The Ours Privacy event flow ensures that your data is:

  1. Tracked from a variety of sources (e.g., pixel script, server-to-server).
  2. Filtered through the Event Allowlist to allow only approved events.
  3. Customized via mappers to fit your specific needs and maintain privacy.
  4. Forwarded to destinations securely.
  5. Verified through the Recent Events Dashboard in the Ours app for transparency.

To get started, you can install the Pixel Script or set up a Server-to-Server Integration. For more advanced configurations, you can explore Custom Event Mapping and Adding Events to Your Allowlist.

Best Practices

  1. Understand the data flow before integration: If there are multiple data sources (e.g., Web SDK, Webhook), understand which source will get dispatched to which destination. If both sources are sending the same event, this will cause duplicate event counts unless otherwise handled.
  2. Append the ours_user_id to all non-Web SDK sources: When applicable, make sure the ours_user_id is passed in with all non-Web SDK payloads. This can be done via hidden input fields, query params, or passing the cookie value directly.
  3. Stop Dispatch when needed: In certain instances, you can configure the stop dispatch function on any destination. For instance, if a user has not yet consented to marketing advertising, then you can stop dispatch for all marketing destinations.
  4. Obfuscate names in Ours Privacy: Ours Privacy offers in-platform obfuscation, either through manual updating, randomization, or bulk CSV uploads. Sending standard event names into Ours Privacy and then obfuscating is best practice.

How is this guide?

On this page

Understanding The Event Flow in Ours Privacy