After GDN, Facebook and Zalo, MGID is an advertising channel that brings in a huge amount of traffic. Because the traffic is so large, if you don’t track MGID conversions, you can easily burn through your budget with few conversions and a high cost per conversion. In this article, I’ll show you how to set up MGID conversion tracking correctly and test it to make sure conversions show up in MGID.
Benefits of MGID conversion tracking
- You’ll see which widgets, devices and regions convert well, which don’t convert, and what each conversion costs.
- Based on that, you’ll know which targets to turn off to save money.
- You can focus on the targets with the most conversions to optimize your campaign and increase orders and sales.
How to track MGID conversions with code
Steps to track MGID conversions with code:
Step 1: Add the MGID conversion tracking code to your website.
Step 2: Add a conversion goal in MGID.
Step 3: Test that conversions are recorded in MGID.
Add the MGID conversion tracking code to your website
Go to your MGID campaign settings, turn on conversion tracking and click Get tracking code to get the code.

Click the box containing the tracking code and it will be copied automatically.

Add the code to LadiPage
In the LadiPage builder, click Settings > Javascript/CSS Code, paste the code into the Before the </head> tag box, then save.
You need to do this for every page involved in the conversion process, for example the ad landing page and the thank you page customers see after placing an order.

Publish the thank you page first. Then go to the ad landing page and edit the form settings so customers are redirected to the published thank you page URL after a successful order.

Add the code to WordPress
On WordPress, install the Insert Headers and Footers plugin (now renamed WPCode) so you can add any code to your site.

Then go to Settings > Insert Headers and Footers (in the current WPCode version, it’s Code Snippets > Header & Footer) and paste the code into the Header box, then click the save button below.

Add a conversion goal in MGID
Go back to where you got the code in MGID and set up the goal as shown below. I use Sale, but you can change it to another action such as Lead, it’s up to you. For the next part, choose URL Contains and paste the last part of your thank you page URL. Remember to click save.

How to track MGID conversions with Google Tag Manager
If you have added Tag Manager to your website, you can use it to track MGID conversions. If you haven’t set it up yet, check out that guide first.
Steps to track MGID conversions with Tag Manager:
Step 1: Get your MGID account ID.
Step 2: Create a conversion trigger.
Step 3: Add the MGID tags to Tag Manager.
Step 4: Test that conversions are recorded in MGID.
Get your MGID account ID
In the MGID conversion tracking settings, open the Google Tag Manager tab, turn it On, then find your MGID Client ID.

Keep it handy, we’ll need it later.
Create a conversion trigger
Now let’s create a trigger for a successful purchase. Click Triggers and create one with these settings:
- Trigger type: Page View.
- This trigger fires on: Some Page Views.
- Condition: Page Path > contains > the last part of your thank you page URL.
Then click save and you’re done.

Add the MGID tags to Tag Manager
Now let’s create the MGID tags. Click Tags > New > Choose a tag type to begin setup…

Click Discover more tag types in the Community Template Gallery, search for MGID, then click MGID Pixel.

Click the Add to workspace button at the top.

When the confirmation window appears, click Add.

Now let’s configure the MGID tag for all pages. Use these settings:
- Tag name: MGID All Pages (or any name that’s easy to remember).
- MGID Client ID: paste the ID you found earlier.
- Event Type: Page view
- Triggering: select All Pages
Then click save to finish this tag.

Next, repeat the steps above to add another MGID tag, but this time configure it for the conversion.
- Tag name: MGID conversion.
- MGID Client ID: paste the ID you found in the step above.
- Event Type: Convertion to Action
- Conversion Category: Sale, Lead or whatever fits your goal.
- Triggering: select the thank you page trigger we created.
Then click Save to finish the conversion tag. Note: when everything is done, remember to click Submit in the Workspace to publish your changes.

Test that conversions are recorded in MGID
To test whether conversions are recorded in MGID, open your list of ads and click an ad’s URL. Complete a conversion yourself, wait about 5 minutes, then check again to see if the number in parentheses has gone up.
For example, in this image, 162(1) means 162 real orders from the ads and 1 test conversion I made myself.

After your campaign has run for a while, go to Widget auction to see which widgets convert well.

Here’s an example from my campaign. You can see which widgets to keep and which to turn off.

You can also see which regions and devices convert well by clicking the analytics icon shown here.

Open the Conversion Stats tab and set Country and Region as shown in the image to see which regions have conversions.
If you want to exclude a region, go back to the campaign settings and remove it in the targeting section.

Conclusion
By tracking MGID conversions and excluding targets that don’t perform, you can save a lot of money. If you’ve got it working, leave a comment below to let me know, and feel free to share this guide with your fellow marketers. Good luck!




