> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runconverge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MGID

> An introduction to the MGID Ads Destination

export const OutboundLink = ({linkText, linkTarget}) => {
  return <a target="_blank" href={linkTarget}> {linkText} 
    <div className="inline h-3 w-3 fill-gray-500 dark:fill-gray-100 text-gray-500 dark:text-gray-300 ml-1 mr-1">
      <svg className="inline w-2.5 h-2.5 bg-gray-500 dark:bg-gray-300" style={{
    maskImage: `url('https://mintlify.b-cdn.net/v6.5.1/solid/up-right-from-square.svg')`,
    maskRepeat: "no-repeat",
    maskPosition: "center center"
  }}></svg> 
    </div>
    </a>;
};

export const IconText = ({name, text, iconSource = "mintlify", iconLocation = "before", iconType = "solid"}) => {
  const sourceUrl = iconSource === 'local' ? `url('/images/icons/${name}.svg')` : `url('https://mintlify.b-cdn.net/v6.5.1/${iconType}/${name}.svg')`;
  return <>
            <div className="inline-block pl-2">
                {iconLocation === 'before' && <div className="h-3.5 w-3.5 fill-gray-800 dark:fill-gray-100 text-gray-800 dark:text-gray-100 inline-block align-middle mr-2">
                        <svg className="w-4 h-4 bg-gray-800 dark:bg-gray-100 " style={{
    maskImage: sourceUrl,
    maskRepeat: "no-repeat",
    maskPosition: "center center"
  }} />
                    </div>}
                <span className="inline-block align-middle font-semibold fill-gray-800 dark:fill-gray-100 text-gray-800 dark:text-gray-100 pl-1 pr-2">{text}</span>
                {iconLocation === 'after' && <div className="h-3.5 w-3.5 fill-gray-800 dark:fill-gray-100 text-gray-800 dark:text-gray-100 inline-block align-middle mr-2">
                        <svg className="w-4 h-4 bg-gray-800 dark:bg-gray-100 pr-3" style={{
    maskImage: sourceUrl,
    maskRepeat: "no-repeat",
    maskPosition: "center center"
  }} />
                    </div>}
            </div>
        </>;
};

export const Icon = ({name}) => {
  return <div className="h-4 w-4 fill-gray-800 dark:fill-gray-100 text-gray-800 dark:text-gray-100 inline-block align-middle">
            <svg className="w-4 h-4 bg-gray-800 dark:bg-gray-100" style={{
    maskImage: `url('https://mintlify.b-cdn.net/v6.5.1/solid/${name}.svg')`,
    maskRepeat: "no-repeat",
    maskPosition: "center center"
  }} />
        </div>;
};

## Overview

Destination Type: <IconText text="Server-side" name="server" iconType="duotone" iconLocation="after" />

***

## Installation Instructions

1. Navigate to your <OutboundLink linkTarget="https://dashboard.mgid.com/" linkText="MGID Dashboard" /> and go to your campaign settings.

2. In your campaign settings, enable **Conversion sensors** and select the **Postback** condition.

3. Fill in the event name field (e.g., `purchase`, `lead`, `signup`). You'll map Converge events to these MGID goal names later.

4. Copy your postback URL from MGID. It will look like:
   ```
   https://a.mgid.com/postback/123456?c={click_id}&e={event_name}&r={revenue}
   ```

5. Note down the **Postback ID** (the digits at the end of the URL path, e.g., `123456` in the example above).

6. In the Converge sidebar, click on <IconText name="arrow-right-from-line" text="Event streams" /> and then click **Create new Destination**.

7. Select the **MGID** destination and click **Next**.

8. Give your destination a **name** (e.g., MGID Destination) and click **Next**.

9. Enter your **Postback ID** from step 5.

10. In the **Set up your conversion events** section, map your Converge events to MGID event names:
    * **Converge Event**: Select the event you want to track (e.g., `Placed Order`)
    * **MGID Event Name**: Enter the exact event name you configured in MGID (e.g., `purchase`)

11. Add additional event mappings as needed for your other conversion goals.

12. Click **Next**.

13. Select the sources you want to forward events from, then click **Next**.

<Note>This is a server-side destination, meaning that only server-side sources can be used with this destination. You can still select client-side sources but the events will not be sent to MGID.</Note>

14. Review any issues and click **Submit**.

<Warning>For this destination to work, you must add the click ID parameter to **all** of your MGID campaigns following step 15 below. **You should add this parameter for every new campaign as well**.</Warning>

15. In your MGID campaign settings, navigate to **Tracking Tags** > **Add custom tracking tag** and add the following parameter:
    ```
    mgidcid={click_id}
    ```

***

## Converge functionality

This integration supports the following Converge destination functionality.

| Converge Feature                                     |       Supported       |
| :--------------------------------------------------- | :-------------------: |
| Custom Events                                        | <Icon name="check" /> |
| Filters                                              | <Icon name="check" /> |
| Server-side Conversions                              | <Icon name="check" /> |
| [Conversion amount](/destinations/conversion-amount) | <Icon name="check" /> |

***

## Event Mapping

MGID uses custom event mapping, meaning you define which Converge events should be forwarded and what they should be called in MGID.

During the destination setup, you configure:

* **Converge Event**: The event from your Converge tracking (e.g., `Placed Order`, `Added To Cart`)
* **MGID Event Name**: The corresponding event name in your MGID campaign goals (e.g., `purchase`, `lead`)

### Revenue Tracking

The MGID destination automatically includes revenue data when available:

* Revenue is taken from the `total_price` property of your Converge events
* Revenue is sent as the `r` parameter in the postback URL
* You can configure whether to use gross or net revenue in the advanced settings

### Click ID Requirements

For attribution to work correctly, MGID requires a click ID to connect ad clicks to conversions:

* The click ID is captured when users click on your MGID ads with the `mgidcid={click_id}` parameter
* This click ID is stored as the `$mgid_click_id` profile property in Converge
* Events will only be forwarded to MGID if this click ID is present

<Note>Events without a valid MGID click ID will be skipped and not forwarded to MGID.</Note>
