# MGID integration

Source: https://skro.eu/docs/integrations/mgid-integration

Set up MGID tracking in Skro, configure traffic source parameters, and connect your advertising campaigns.

[MGID](https://mgid.com) integration gives you the ability to manage and optimize all your MGID ad campaigns through the Skro interface.

- Sync cost for campaigns, teasers and widgets every 30 min.
- Check the status of your campaigns, teasers and widgets.
- Pause or resume campaigns, teasers and widgets.

In this guide, you will learn how to set up your campaigns in MGID and Skro so MGID can pass information to Skro and back with a selected tracking method. This guide does not cover all aspects and options available when creating a campaign on these two platforms. Basic knowledge regarding setting up campaigns in MGID and Skro is required.

**Manage MGID campaigns through the Skro**

![Manager MGID campaigns](/images/docs/mgid-reporting-1.png)

**Manage MGID teasers through the Skro**

![Manager MGID campaigns](/images/docs/mgid-reporting-2.png)

**Manage MGID widgets and sub ids through the Skro**

![Manager MGID campaigns](/images/docs/mgid-reporting-3.png)

<Steps>

## Step 1. Get MGID API Credentials [#step-1-get-mgid-api-credentials]

MGID's API **Client ID** and **Access Token**. You can get one by following the steps below:

1. In MGID, go to the **MY PROFILE** view.
2. Go to the **USERS** tab.
3. Locate a user you want to grant API access to and click the **Get a token**.

![Get MGID API token](/images/docs/mgid-cred-1.png)

Copy both the **API Client ID** and **Access Token** to any text editing tool.

![Get MGID API token](/images/docs/mgid-cred-2.png)

Once you have everything ready, read the further part of this guide.

## Step 2. Setup integration [#step-2-setup-integration]

- Log in to your **Skro** account.
- Navigate to **Settings → Integrations**.
- In the **Traffic Sources** section click **Add**.

![MGID Integration step 1](/images/docs/mgid-integration-1.png)

- Click **MGID** logo and integration form will pop up.

![MGID Integration step 2](/images/docs/mgid-integration-2.png)

- Enter your **Integration Name**.
- Enter your MGID **Client ID**.
- Enter your MGID **Access Tokent**.
- Click **Next**.

![MGID Integration step 4](/images/docs/mgid-integration-3.png)

- If you want to send conversions info back to MGID, then you will need to enable **Conversion API.**
- **Conversion Event Name** - must be the same as you typed in MGID. When creating Skro campaign you will need to specify which conversion goal to send to.
- **Include Conversion Payout** - If checked, we will send conversion revenue and currency to MGID.
- Click **Save & Close**.

![MGID Integration step 5](/images/docs/mgid-integration-4.png)

- You MGID account is successfully integrated.
- You can switch on/off cost sync with given switch.

![MGID Integration step 5](/images/docs/mgid-integration-5.png)

## Step 3. Associate the integration with your traffic source [#step-3-associate-the-integration-with-your-traffic-source]

- Navigate to the **Traffic Sources** and click **Create**.

![Setup MGID traffic source Step 1](/images/docs/mgid-integration-6.png)

- Click **MGID** logo.

![Setup MGID traffic source step 2](/images/docs/mgid-integration-7.png)

- Postback URL is already set with correct macros.
- Select your MGID integration from the dropdown menu.

![Setup MGID traffic source step 4](/images/docs/mgid-integration-8.png)

- All parameters are already prefilled for you.
- Click **Save & Close**.

The integration is ready. Continue by creating a campaign for MGID.

## Step 4. Create a Campaign in Skro [#step-4-create-a-campaign-in-skro]

First you will need to add your offer.

- Navigate to the **Offers** view and click **Create**.
- Select workspace.
- Add name.
- Add your offer URL and add macros if needed.
- Click **Save & Close**.

![Setup Skro Offer](/images/docs/google-offer-1.png)

- Navigate to the **Campaigns** view and click **Create**.
- Select your integrated **Traffic Source** as MGID.
- Select your **Conversion Event Name**. That is needed to send conversion info back to MGID.
- Cost Model should be **Auto**.
- Select your cost currency.
- Click **Next**

![Setup Skro Campaign](/images/docs/mgid-skro-camp-1.png)

- Select workspace.
- Add descriptive name to your campaign.
- Click **Next**

![Setup Skro Campaign](/images/docs/mgid-skro-camp-2.png)

- Choose your **Destination Type**. In this example we use **flow**
- Choose your redirect mode. In this example we use **redirect 302**
- In given example we use only offers, Switch on **Use only offers** and select your offer. With MGID you are allowed to use **Redirect** tracking method, so you can add multiple landing pages and offers to your campaign.
- Click **Save**

![Setup Skro Campaign](/images/docs/mgid-skro-camp-3.png)

- Choose the **Redirect** method.
- Copy and paste the Campaign Tracking URL to MGID.

<Callout type="info">

In given example we have that kind of URL:

```text
https://skrotrack.com/campaign/e5e23337-50c4-4862-2272-d58886287abc?cost={click_price}&cid={click_id}&teaser_id={teaser_id}&campaign_id={campaign_id}&widget_id={widget_id}&category_id={category_id}
```

</Callout>

![Setup Skro Campaign](/images/docs/mgid-skro-camp-4.png)

## Step 5. Create a Campaign in MGID [#step-5-create-a-campaign-in-mgid]

Now you have your campaign URL with tracking parameters added. In the next step you will submit it as your item's URL in MGID campaign setup. In order to do that, perform the following steps:

- Sign in to your MGID account.
- Go to the **Advertisers** tab.
- Click the **Add Campaign** and setup your campaign.

![Setup MGID Campaign](/images/docs/mgid-campaign-1.png)

**Campaign Settings** - Provide all required information. This includes:

![Setup MGID Campaign](/images/docs/mgid-campaign-3.png)

- General.
- Targeting.
- Dynamic Retargeting .
- Schedule
- Tracking Tags
- Conversion sensors

![Setup MGID Campaign](/images/docs/mgid-campaign-2.png)

Add your conversion event name same as you added into Skro.

Once you have provided the required information, click the **Confirm**.

**Create Teasers** - Provide a target URL and a creative. In order to do so, perform the steps below:

- Paste the copied campaign tracking URL from Skro into the **URL** field.
- Upload a creative or choose one from the stock photo library, provide headlines. Once you set up your ad, click the **Save and Go**.

![Setup MGID Campaign](/images/docs/mgid-campaign-4.png)

Congratulations, you have successfully set up tracking of MGID traffic with Skro. Each time a visitor clicks on your ad, will be directed to your landing page with Skro's tracking parameters being passed.

</Steps>

## Verify the setup [#verify-the-setup]

Open the generated campaign URL and check that the visit appears in Skro. Confirm that traffic source macros resolve to actual values. If you send conversions back to the source, verify a test conversion in both systems.

<Callout title="Troubleshooting">

If data is missing, check the selected workspace, integration, campaign, and reporting date range. Compare parameter names and macro values with the examples in this guide before repeating the test.

</Callout>

## Related guides [#related-guides]

<Cards>

<Card title="Postback URL parameters" href="/docs/postback/parameters-in-postback-urls" />

<Card title="Custom conversions" href="/docs/postback/custom-conversions" />

</Cards>
