# Segment

DitCal integrates with Segment, enabling you to send page view and booking event data directly to Segment. This allows you to track user interactions and appointment-related events efficiently across your preferred analytics and marketing platforms.

### Benefits of Segment Integration

* **Track Visitor Activity**: Send page views and user engagement data to Segment.
* **Monitor Booking Events**: Capture data on new bookings, cancellations, and reschedules.
* **Enhance Analytics**: Use Segment to route data to tools like Google Analytics, Mixpanel, and CRMs.
* **Improve Marketing Strategies**: Leverage booking data for targeted campaigns and personalized messaging.

### How to Integrate Segment with DitCal

Follow these steps to connect DitCal with Segment:

#### Step 1: Get Your Segment Write Key

1. Log in to your Segment account.
2. Navigate to **Connections** > **Sources**.
3. Select an existing source or create a new one.
4. Copy the **Write Key** from your source settings.

<figure><img src="/files/OmAI76VOS2qUhYM5Ouak" alt=""><figcaption></figcaption></figure>

#### Step 2: Connect Segment to DitCal

1. Log in to your DitCal account.
2. Go to **Settings** > **Apps**.
3. Find **Segment** and click **Connect**.
4. Paste your Segment **Write Key** in the provided field.
5. Click **Save** to apply the changes.

#### Step 3: Enable Event Tracking

1. Ensure DitCal is set to send event data to Segment.
2. The following events will be tracked:
   * **Page Views**: Tracks when users visit your DitCal booking page.
   * **New Booking**: Captures when a user successfully schedules an appointment.
   * **Booking Canceled**: Logs when a user cancels a booking.
   * **Booking Rescheduled**: Records when a user modifies an existing booking.
3. Verify that event data appears correctly in your Segment event stream.

### Managing Your Segment Integration

* To disconnect Segment, navigate to **Settings > Apps** and select **Disconnect** under Segment.
* Modify tracking settings anytime by updating your Segment Write Key in DitCal’s integration settings.
* Use Segment’s dashboard to analyze and route DitCal data to your preferred analytics or marketing tools.

### Troubleshooting

#### Not Seeing Data in Segment?

* Ensure the correct Segment **Write Key** is entered in DitCal.
* Check your Segment **Event Stream** for real-time data.
* Confirm that Segment is properly configured to receive data from DitCal.
* Wait a few minutes, as data propagation may take some time.

### Conclusion

Integrating DitCal with Segment allows you to efficiently track page views and booking events, ensuring seamless data collection and analytics. Follow the steps above to set up the integration and optimize your tracking and marketing efforts.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.ditcal.com/integrations/segment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
