# Data Mapping

> Configure and customize data mappings to transform events and visitor properties and control what each destination receives.

Source: https://docs.oursprivacy.com/docs/data-mapping

Ours Privacy allows you to map your event data to each destination's format, providing flexibility in how events and their associated properties are transformed and sent to your configured destinations. Whether you want to rename events, hash visitor data, or customize property handling, data mapping enables full control over your data pipeline.

***

## Renaming Events

One of the key features of data mapping is the ability to rename events before they are sent to a destination. This is particularly useful for:

* Aligning event names with the schema requirements of specific destinations.
* Obfuscating sensitive event names to enhance privacy.

To reuse a rename on another destination, open the event's row actions in **Allowed Events** and select **Copy rename to destination**. Only the rename is copied; the rest of the mapping stays destination-specific.

### Example

This mapping sends appointment requests to an analytics destination as `Appointment Booked`, retains the service line, and hashes the visitor email before dispatch.

![A custom event mapping that renames an appointment request, maps its service line, and hashes the visitor email](https://docs.oursprivacy.com/img/data-mapping/data-mapping-img-1.jpg)

***

## Mapping Configuration Overview

Ours Privacy supports two types of mappings:

1. **Default Mapping**: The baseline fields and transformations that apply to every event dispatched by this destination.
2. **Custom Mappings**: Per-event overrides for events that need different fields or transformations.

Use the **Default Mapping** tab to set the shared baseline, then use **Custom Mappings** when an individual event needs an override.

![The Default Mapping tab for an AWS EventBridge destination mapping the event name and service line unchanged, the visitor email with Hashed normalized, and the visitor phone set to Redacted](https://docs.oursprivacy.com/img/data-mapping/data-mapping-img-2.jpg)

### How to Configure Mappings

1. Open a destination and select the **Default Mapping** tab, or **Custom Mappings** to change an individual event.
2. For each destination field, choose the value to send. Open the **Variable Dictionary** to find the variables you can use.
3. Choose a modification, such as **Hashed** or **Domain only**, to change the value before the destination receives it.

***

## Modifications

A modification changes a field's value before the destination receives it. Each field offers the modifications that fit it, and hovering an option shows an example.

| **Modification**                                       | **What the destination receives**                                                                                                                                          |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Not modified**                                       | The value as captured.                                                                                                                                                     |
| **Null**                                               | `null`.                                                                                                                                                                    |
| **Redacted**                                           | `REDACTED` in place of the value.                                                                                                                                          |
| **Hashed**                                             | A SHA-256 hash of the value as captured.                                                                                                                                   |
| **Hashed normalized**                                  | A SHA-256 hash of the trimmed, lowercased value. The phone, date of birth, state, country, zip, and gender variants also reformat the value the way ad platforms match it. |
| **Hashed MD5**                                         | An MD5 hash, for destinations that require it.                                                                                                                             |
| **Set to 1.1.1.1**, **Regional IP**, **DMA IP**        | A placeholder IP address, or one that geolocates to the visitor's region or Designated Market Area.                                                                        |
| **Snake case**, **Camel case**, and other case options | The text reformatted to that case.                                                                                                                                         |

### URL fields

URL fields, such as the page URL and referrer, have their own options. For `https://your-site.com/book/appointment?utm_source=google&location=chicago`, each sends:

| **Modification**           | **What the destination receives**                                           |
| -------------------------- | --------------------------------------------------------------------------- |
| **Full URL**               | `https://your-site.com/book/appointment?utm_source=google&location=chicago` |
| **Domain + path + UTMs**   | `https://your-site.com/book/appointment?utm_source=google`                  |
| **Domain + path**          | `https://your-site.com/book/appointment`                                    |
| **Domain + UTMs**          | `https://your-site.com/?utm_source=google`                                  |
| **Domain only**            | `https://your-site.com/`                                                    |
| **Redacted domain + path** | `https://redacted.com/book/appointment`                                     |
| **Redacted domain**        | `https://redacted.com`                                                      |

***

## Custom Salting

Add a salt to a destination to make every value it hashes unique to you. On the destination's **Settings** tab, expand **Hashing Salt** under **Advanced**, then enter a value or select **Generate New Salt**. Destinations have no salt until you add one.

![An AWS Lambda destination's Settings tab with the Hashing Salt section expanded under Advanced, showing a masked salt value and the Generate New Salt button](https://docs.oursprivacy.com/img/data-mapping/data-mapping-img-3.jpg)

Ad platforms match on unsalted hashes, so a salt typically lowers match rates for that destination. Changing a salt changes every hashed value the destination receives.

***

## `$ignore` Directive

Use the `$ignore` directive to exclude a property from the final output, so the destination doesn't receive it.

### Example:

To stop sending a field, enter `$ignore` as its value.

***

## Next Steps

* Review the [Destination Overview](https://docs.oursprivacy.com/docs/destination-overview).
* Combine, reformat, and conditionally map values with [Mapping Templates](https://docs.oursprivacy.com/docs/mapping-templates).
* Debug mappings using the [Recent Events Dashboard](https://docs.oursprivacy.com/docs/tracking-and-debugging-events).
* Ask the [AI Assistant](https://docs.oursprivacy.com/docs/ai-assistant/reviewing-your-setup) to explain a destination's mappings, including field transforms, hashing, and templates.
