# Forward Custom Events from GTM to CustomFit

To make it easier to send custom events from Google Tag Manager (GTM) to CustomFit, you can import the CustomFit GTM Event Forwarder template into your GTM account.

Suppose you've configured GTM tags for events like "Add to Cart," "Buy Now," and "Checkout" in Google Tag Manager. Now, if you want to add or import "Add to Cart" as a goal event in CustomFit, you can do it easily with the CustomFit GTM Event Forwarder.

### Importing CustomFit GTM Event Forwarder

To import the CustomFit GTM Event Forwarder, perform the below steps:

* Download the template from [here](https://cdn.customfit.ai/customfit-gtm-event-forwarder.zip).
* Log into your GTM account and choose the relevant workspace.
* Click on the T**emplates** from the sidebar and click on the **New template** button in the Tag templates section.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FWl5nnLDl3cZ60VoH6hev%2FScreenshot%202024-01-02%20at%202.24.48%E2%80%AFPM%20(1).png?alt=media&#x26;token=5fe44305-7457-42ce-a98d-0de137e91a31" alt=""><figcaption></figcaption></figure>

* Click the **⋮** present at the top right corner of the Template Editor page and choose the **Import** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FENB3QzgO0gGZWQLo6FUq%2FScreenshot%202024-01-02%20at%202.25.14%E2%80%AFPM%20(1).png?alt=media&#x26;token=22bfe774-a4eb-437f-b700-1a30f2c9c89f" alt=""><figcaption></figcaption></figure>

* Locate and pick **template.tpl** from the downloaded files.
* Click on the **Save** button to successfully import the CustomFit GTM Event Forwarder.

### Creating Trigger

* Click on the **Triggers** in the sidebar, and then click on the **New** button.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FmVpb7EukLBG6dhNXaVyA%2Fimage%20(22).png?alt=media&#x26;token=84e24871-7931-4609-9b25-5b3e59f4a786" alt=""><figcaption></figcaption></figure>

* Give the **Trigger Name** as **CustomFit-GTM-Event-Forwarder-Trigger**.
* Next, click on the **Trigger Configuration** and choose the Trigger type as **Custom Event**.
* Enter the Event name as **.\*** and Select the **Use regex matching** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FhAifNb1bFFa8aRF5Jt92%2FScreenshot%202024-01-05%20at%205.28.43%E2%80%AFPM.png?alt=media&#x26;token=5e8f3148-fcc4-4135-ba42-e7ac62a82e1b" alt=""><figcaption></figcaption></figure>

* Click on the **Save** button.

### Creating Tag

* Click on the **Tags** in the sidebar, and then click on the **New** button.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2Fe4v0vinOvdZ9J4cS51Y3%2Fimage%20(21).png?alt=media&#x26;token=c61cb8c4-f5e6-45f1-9391-af0ce7d0cbad" alt=""><figcaption></figcaption></figure>

* Give the **Tag Name** as **CustomFit GTM Event Forwarder Tag**.
* Next, click on the **Tag Configuration** and choose the Tag type as **CustomFit.ai Event Forwarder**.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FTYVBZx1gfIIOqxQ2mdnr%2FScreenshot%202024-01-05%20at%205.31.19%E2%80%AFPM%20(1).png?alt=media&#x26;token=2d7f5132-4e59-4c5f-97ee-33090297f4bf" alt=""><figcaption></figcaption></figure>

* To forward a custom event to CustomFit, click the **+ Add Event** button and enter the event name. You can add 'n' number of custom events to CustomFit. Ensure that you enter each event that you want to forward to CustomFit.
* To exclude a few of the event properties, select **+ Add property** and enter the name of the property to be excluded.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FMkN5viUnk6UdLTcjYjjU%2FScreenshot%202024-01-05%20at%205.36.59%E2%80%AFPM.png?alt=media&#x26;token=b524169e-be55-40f4-927c-a39bbe176546" alt=""><figcaption></figcaption></figure>

* Click on the Triggering section and select the **CustomFit-GTM-Event-Forwarder-Trigger.**
* Click on the **Save** button.

### Adding GTM Custom Event as Goal event in CustomFit

* Click on the experience to which you want to add a goal event.
* Click on the goals tab.
* Click on **+ Add Goal events.**

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FnbEaIJ0vQbA1ZwZXEx1N%2Fimage.png?alt=media&#x26;token=a08624d5-4497-478b-85e1-440e89c9489d" alt=""><figcaption></figcaption></figure>

* Then, give the goal name from the event type drop-down, and select the **Event type** as **Custom Event**.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FwWy4JFM9rc0PCVbkJ1fn%2Fimage.png?alt=media&#x26;token=47aa06d6-1059-4671-b066-3d1226a1af35" alt=""><figcaption></figcaption></figure>

* Select the required GTM event from the events list.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2F5v7GwjpgiAEsHbWMMzBv%2Fimage.png?alt=media&#x26;token=b0185a41-37fd-48ec-8ee6-865d495d7fba" alt=""><figcaption></figcaption></figure>

* At last select the goal evaluation type and click on the Create button.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FWoNt9Gntzb0jF9DQgrbX%2Fimage.png?alt=media&#x26;token=69ad1f05-8a23-4ffd-a9d7-aa0a344061e9" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/-I-nd5w8wPM>" %}
