Mailgun tag for server Google Tag Manager

Sep 30, 2022

Mailgun is a mail delivery service used to send and track emails from the website or application using SMTP. It has an intelligent inbound routing system that lets you know where every sent email will end up, giving your company greater control of what goes out on its behalf.

In this article, I will describe how the Mailgun tag for server Google Tag Manager works and how you can send emails through Mailgun depending on user actions on your site. 

What is Mailgun?

Mailgun was designed for developers, and the primary purpose is to allow users to send out bulk emails quickly and scale fast. However, Mailgun doesn't have some basic features like email templates found in other tools, which might make it less desirable when businesses need to send an email, not only with the help of developers. 

Setting up Mailgun integration can be extremely difficult when compared to other tools. However, it’s worth remembering that Mailgun is not an email marketing tool (like Klavio or ActiveCampaign). It was designed to send transactional emails in high volumes. Since Mailgun does not offer an all-suite of tools that most email marketing tool offers, Mailgun’s subscription packages have reasonable pricing and email limits. 

Mailgun can be used to send emails in bulk or deliver transactional emails. Transactional emails are triggered after a user's action on the website or app. It can be user registration, forgot password, purchase, etc. 

To Simplify Mailgun integration to your website, we create a Mailgun tag for the server Google Tag Manager container that enables you to send transactional emails using customer actions on your site. 

How Mailgun sGTM tag works

Before setting up the Mailgun s2s tag, ensure you correctly configured your Mailgun account.

Mailgun sGTM tag allows performing two actions: Send an Email or Add/Update a Contact.

API Key - use this link to find info on how to get an API key.

Domain Zone - select if you want to use the US or EU domain zone. 

Sending domain - specify your Mailgun sending domain

Add from email to email and email subject

Add email content - you can use constant or GTM variable.

Logs Settings - select if you want to use stape logs 


Mailgun server-side tag for Google Tag Manager makes it easy to send transactional emails based on user interactions on your website. All you need to do is set up a few simple tags in the sGTM container. No need to ask developers for help. It makes Mailgun integration more accessible and straightforward than ever before. 

Tagged with:Email

Host your GTM server at Stape