# Bring your data together

> One stream per customer from your site, your server and your other tools. What is automatic, what goes back to your tools, and how to send from any tool.

Source: https://datacenter.so/docs/bring-your-data-together
Section: Measure

Your customers leave a trail in many tools: your site, your store, your email and text tools, your CRM, your phone. Datacenter puts it in one place. Each [customer profile](https://datacenter.so/docs/customer-profiles) has one stream, in time order, with every item labeled by where it came from.

Customer profiles are on paid plans: Solo, Studio, Agency and Custom, with the site in [90-day tracking](https://datacenter.so/docs/tracking-modes).

## What is automatic today

| From | What shows up |
|---|---|
| Your site (the Datacenter script) | Visits with their source, short link clicks, email and text clicks, custom events, purchases |
| Your server ([Events API](https://datacenter.so/docs/events-api)) | Server events and purchases, with value |
| [Stripe](https://datacenter.so/docs/stripe-connector) | Payments, refunds, and subscriptions started, renewed, changed and canceled |
| [Shopify](https://datacenter.so/docs/shopify-connector) | Orders, refunds and new customers, with the UTMs Shopify kept |
| [Klaviyo](https://datacenter.so/docs/klaviyo-connector) | Email and text sends, opens, clicks and unsubscribes |
| [Mailchimp](https://datacenter.so/docs/mailchimp-connector) | Campaign sends, opens, clicks and unsubscribes |
| [Attentive](https://datacenter.so/docs/attentive-connector) | Text and email sends, opens, clicks and unsubscribes, by webhook from the day you turn it on |
| Meta Conversions API | Each send to Meta and its status |
| [Meta Ads](https://datacenter.so/docs/meta-ads-spend) | Daily spend by campaign, ad set and ad, with Meta's own purchase counts |
| [Spend files](https://datacenter.so/docs/csv-spend-import) | Daily spend from Google Ads, TikTok, Microsoft, LinkedIn or any platform |

All connectors connect from the site's **Integrations** page (under **Settings**). Stripe, Shopify, Klaviyo and Mailchimp import the last 90 days, then keep up on their own. A sale that also came in from your site or the Events API is counted once, and shows once on the customer's timeline with both sources.

## What goes back out

Klaviyo, Mailchimp and Attentive also get data back from Datacenter, for people they already have: each customer's first and last source, lifetime value, orders and [best send hour](https://datacenter.so/docs/segments-and-best-send-time), and the [segments](https://datacenter.so/docs/segments-and-best-send-time) you pick. Your tool can then send to the right people at the right hour.

## Send data from any tool

Any tool that can call a webhook can add to the stream today. Send it to the Events API with two extra fields:

- `kind`: what happened. One of `email_sent`, `email_opened`, `email_clicked`, `email_unsubscribed`, `sms_sent`, `sms_clicked`, `sms_unsubscribed`, `form`, `call`, `note`, `order`, `refund`, `subscription_started`, `subscription_renewed`, `subscription_changed` or `subscription_canceled`.
- `source`: the tool, in lowercase, such as `klaviyo`, `mailchimp`, `attentive`, `postscript`, `hubspot` or `my_crm`.

Say who it is with `email`, `phone`, `visitor.id` or `external_ids`. Put short details in `payload`.

```json
{
  "name": "October letter",
  "kind": "email_opened",
  "source": "klaviyo",
  "event_id": "klaviyo-open-81723",
  "email": "ann@example.com",
  "payload": { "campaign": "october-letter" }
}
```

- `order` counts like any purchase: it reaches goals, the attribution report and Meta.
- Every other kind is added to the customer's stream only. It does not count toward your plan's events or your goals.
- `refund` with a `value` lowers the customer's revenue.
- `event_id` keeps a retried webhook from being added twice.
- `payload` takes up to 12 short text or number values. Anything that looks like an email or phone number is dropped.

### External ids

`external_ids` ties ids from other tools to the customer, so the next item can use them alone:

```json
"external_ids": { "stripe_customer": "cus_Q8x2", "hubspot_contact": "5012" }
```

Names are lowercase with underscores. Up to 10 per event.

### Zapier

1. Make a Zap with the trigger from your tool, such as "New Open" in your email tool.
2. Add the action **Webhooks by Zapier**, then **POST**.
3. URL: `https://datacenter.so/api/v1/events`. Payload type: `json`.
4. Data: `name`, `kind`, `source`, `email` and `event_id`, mapped from the trigger.
5. Headers: `Authorization` with `Bearer ` and your site's secret key.

### Make

1. Add the **HTTP** module, **Make a request**.
2. URL `https://datacenter.so/api/v1/events`, method `POST`.
3. Header `Authorization: Bearer st_sk_...`. Body type **Raw**, content type **JSON**.
4. Write the JSON body as in the example above, with values from the earlier modules.

Keep the secret key in the tool's own settings. Never put it in a page.

## Native connectors

Live now: [Stripe](https://datacenter.so/docs/stripe-connector), [Shopify](https://datacenter.so/docs/shopify-connector), [Klaviyo](https://datacenter.so/docs/klaviyo-connector), [Mailchimp](https://datacenter.so/docs/mailchimp-connector), [Attentive](https://datacenter.so/docs/attentive-connector) and [Meta Ads spend](https://datacenter.so/docs/meta-ads-spend). Spend from any other ad platform comes in [from a file](https://datacenter.so/docs/csv-spend-import).

Ad spend joins your sales on the Attribution tab, not the customer stream: it belongs to campaigns, not people.

Postscript limits its API to partners, so it has no connector yet (when shipped). [What works today](https://datacenter.so/docs/postscript-connector).

Next (when shipped): Google Ads spend in one click, then CRMs such as HubSpot and GoHighLevel, call tracking and form tools. Until then, the Events API above covers any of them that can send a webhook.
