# Connections

> Connect and sync your tools — manage data streams, destinations, transformations, and real-time event tracking.

Source: https://docs.graph8.com/engage/connections/

Connections is graph8's data pipeline. It collects events from your website, transforms them with custom functions, and routes them to destinations — webhooks, data warehouses, JavaScript tags, and external connectors.

## How It Works

Events flow through a simple pipeline:

1. **Streams** collect events from your website or app (page views, form submissions, custom events)
2. **Functions** transform or filter events in transit using custom JavaScript
3. **Destinations** receive the processed events (webhooks, warehouse, tags, connectors)
4. **Links** define which streams connect to which destinations, with routing rules

## Streams

A stream is a data source — typically your website. Each stream has:

| Field | What It Does |
|-------|-------------|
| **Name** | Label for the data source (e.g., "Website", "Mobile App") |
| **Domains** | Allowed source domains for CORS validation |
| **Browser key** | Public write key for the JavaScript SDK |
| **Server key** | Private key for server-side event tracking |

When you set up graph8, a default "Website" stream is created automatically with browser and server keys.

### Event Types

Streams accept standard event types:

| Event | What It Tracks |
|-------|---------------|
| **page** | Page views with URL, referrer, and page metadata |
| **track** | Custom events (e.g., button clicks, signups) |
| **identify** | User identification with traits |
| **group** | Account/company grouping |
| **form_submission** | Form fills captured from your website |

## Destinations

Destinations are where events are sent after collection and transformation.

### Destination Types

| Type | What It Does |
|------|-------------|
| **Webhook** | HTTP POST event payloads to any URL |
| **Tag** | Inject JavaScript into the page for client-side integrations |
| **Warehouse** | Batch events to a data warehouse for analytics |
| **Connector** | External connectors for data sync |

### Default Destinations

When you set up Connections, graph8 creates several destinations automatically:

| Destination | Type | Purpose |
|-------------|------|---------|
| **Identify** | Tag | Visitor identification pixel — resolves anonymous visitors to companies |
| **Chat** | Tag | Web chat widget script |
| **Form Tracker** | Tag | Captures form submissions from any form on your site |
| **Campaign Visitor Trigger** | Webhook | Tracks campaign link clicks and associates them with contacts |
| **Forms Sync** | Webhook | Sends form submissions to graph8 for contact creation |
| **Tailor** | Tag | Website personalization engine |
| **Warehouse** | Warehouse | Event storage for analytics (optional) |

### Custom Destinations

Add your own destinations to route events wherever you need:

- **Webhook destinations** — send events to any HTTP endpoint
- **Tag destinations** — inject custom JavaScript (analytics, pixels, chat widgets)
- **Connector destinations** — sync data to external databases and SaaS tools

## Functions

Functions are custom JavaScript that transform events in transit. Use them to:

- **Filter** — drop events that don't meet criteria
- **Enrich** — add data to events before they reach a destination
- **Transform** — reshape event payloads to match destination expectations
- **Route** — conditionally send events to different destinations

graph8 includes built-in functions for common tasks like campaign visitor filtering and form submission processing.

## Links

Links connect streams to destinations. Each link defines:

| Setting | What It Controls |
|---------|-----------------|
| **Source** | Which stream sends events |
| **Destination** | Where events are routed |
| **Functions** | Which transformation functions to apply |
| **Event filter** | Which event types to forward |
| **Host filter** | Which source domains to accept |

For sync-type links, you can also configure:

- **Schedule** — sync frequency
- **Timezone** — scheduling timezone
- **Table prefix** — naming convention for destination tables

## Syncs

Syncs enable bidirectional data transfer with external systems. Configure:

- Which data streams to sync
- Sync schedule
- Destination table naming

## Live Events

Monitor your event pipeline in real time:

- View incoming events as they arrive
- Inspect event payloads and metadata
- Debug routing and transformation issues
- Verify that destinations are receiving data

## Campaign Tracking

Connections powers campaign attribution automatically. When a prospect clicks a campaign link:

1. The URL contains a campaign hash identifying the sequence step and contact
2. The graph8 tracking script captures the page view with the hash
3. The Campaign Visitor Trigger destination sends the event to graph8
4. graph8 links the visit to the correct contact and sequence step

This happens automatically — no manual setup required beyond having Connections installed on your site.

> **Tip:**
> Install the graph8 tracking script on all pages of your website. This enables visitor identification, form tracking, and campaign attribution across your entire site — not just landing pages.

## Next Steps

- [Web Chat →](https://docs.graph8.com/engage/web-chat/) — Chat widget delivered via Connections
- [Sequencer →](https://docs.graph8.com/engage/sequencer/) — Campaign tracking powered by Connections
- [Appointments →](https://docs.graph8.com/engage/appointments/) — Appointment booking and CRM sync
