# Google tag manager

DitCal integrates with Google Tag Manager (GTM), enabling you to send page views and booking event data directly to your Google Tags. This allows you to track user interactions and appointment-related events efficiently within Google Analytics, Google Ads, and other marketing tools.

### Benefits of Google Tag Manager Integration

* **Track Visitor Activity**: Send page views and user engagement data to GTM.
* **Monitor Booking Events**: Capture data on new bookings, cancellations, and reschedules.
* **Enhance Marketing Insights**: Use Google Tags to optimize your advertising and analytics.
* **Seamless Integration**: Easily pass event data to tools like Google Analytics 4 (GA4) and Google Ads.

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

### How to Integrate Google Tag Manager with DitCal

Follow these steps to connect DitCal with GTM:

#### Step 1: Get Your Google Tag Manager Container ID

1. Log in to your Google Tag Manager account.
2. Navigate to your **Workspace**.
3. Copy your **Container ID** (formatted as GTM-XXXXXX) from the top right corner.

#### Step 2: Connect Google Tag Manager to DitCal

1. Log in to your DitCal account.
2. Go to **Settings** > **Apps**.
3. Find **Google Tag Manager** and click **Connect**.
4. Paste your GTM **Container ID** 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 GTM.
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 Google Tag Manager event stream.

### Managing Your Google Tag Manager Integration

* To disconnect GTM, navigate to **Settings > Apps** and select **Disconnect** under Google Tag Manager.
* Modify tracking settings anytime by updating your GTM Container ID in DitCal’s integration settings.
* Use GTM’s dashboard to analyze and pass DitCal data to Google Analytics, Google Ads, and other platforms.

### Troubleshooting

#### Not Seeing Data in Google Tag Manager?

* Ensure the correct **Container ID** is entered in DitCal.
* Check your **Tag Assistant** in GTM to verify event data is being received.
* Confirm that Google Analytics and Google Ads are properly configured to receive event data.
* Wait a few minutes, as data propagation may take some time.

### Conclusion

Integrating DitCal with Google Tag Manager allows you to efficiently track page views and booking events, ensuring seamless data collection for analytics and marketing. Follow the steps above to set up the integration and optimize your tracking 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/google-tag-manager.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.
