Auto Tagger

Make UTM tagging easy and automatic for Mautic 4, 5, 6, and 7.

Set it and forget it: Once you set up Auto Tagger, you never need to worry about UTM tags again. The plugin takes care of everything for you—no more manual tagging!

The Mautic Auto Tagger plugin saves you time by adding UTM parameters and custom tags to your links in emails, dynamic content, and focus items. It can fill in UTM tags automatically when you create new emails or content.

Main Features

  • Automatic UTM tags: If your links don't have UTM tags, the plugin adds them for you.
  • Pre-filled UTM tags: Default UTM tags appear automatically when you make a new email, dynamic content, or focus item.
  • Custom tags: Add your own key-value tags to links.
  • Tokens: Use tokens to insert info like email name, campaign ID, or contact fields.
  • Transliteration: Use |transliterate to make token values URL-safe.
  • Channel-specific tags: Choose different tags for Email, Dynamic Content, and Focus.
  • No overwriting: If a link already has UTM tags, the plugin leaves them alone.

Using Tokens

  • {contactfield=alias} — For contact fields (e.g. {contactfield=firstname})
  • {emailfield=property} — For email properties (e.g. {emailfield=name})
  • {dynamiccontentfield=property} — For dynamic content properties
  • {focusfield=property} — For focus item properties
  • {campaignfield=property} — For campaign properties
  • {eventfield=property} — For campaign event properties

Add |transliterate to a token to make it URL-safe: {emailfield=name|transliterate}

How Does It Work?

  • Automatic tagging: When you send an email or use dynamic content, the plugin checks each link. If it doesn't have UTM tags, it adds your default UTM tags and any custom tags you set. Tokens are replaced with real values.
  • Pre-filled tags: When you create a new email, dynamic content, or focus item, the UTM tag fields are filled in for you automatically.
  • Custom tags: Add as many custom key-value pairs as you want (like my_param=value or tracker={campaignfield=id}), and use tokens in them.
  • No conflicts: The plugin won't overwrite UTM tags that are already there. Custom tags are only added if their keys aren't already used.

Example

  1. Set up: In the plugin settings under "Tags for emails", set:
    • utm_source: mautic
    • utm_medium: email
    • utm_campaign: {campaignfield=name|transliterate}
    • utm_content: {emailfield=name|transliterate}
    • Custom Tag: channel=email
  2. Turn on: Check "Automatically append UTM parameters to URLs if not exist".
  3. Create: Make an email called "Summer Sale" in a campaign called "Q3 Promotions" with a link like https://my-shop.com/products.
  4. Send: The link will become: https://my-shop.com/products?utm_source=mautic&utm_medium=email&utm_campaign=Q3-Promotions&utm_content=Summer-Sale&channel=email

Installation

Step 1: Copy the plugin

Place the plugin folder in plugins/MauticAutoTaggerBundle

Step 2: Clear cache

php bin/console cache:clear

Step 3: Reload plugins list

php bin/console mautic:plugins:reload

Step 4: Re-generate assets

php bin/console mautic:assets:generate

After installation, go to Settings > Plugins in Mautic and make sure the plugin is enabled.

Settings

  1. Go to Settings > Plugins in Mautic.
  2. Find Automatic UTM Tagger and click on it.
  3. Click the Features tab.

Main Options

  • Automatically add UTM tags during creating new form — Turn this on to have the plugin fill in default UTM tags when you make a new Email, Dynamic Content, or Focus Item.
  • Automatically append UTM parameters to URLs if not exist — Turn this on to have the plugin add your UTM tags (and custom tags) to any links that don't already have UTM tags.

Tags for Each Channel

You can set default UTM tags and custom tags for Emails, Dynamic Content, and Focus Items. Each channel has its own section for UTM and custom tags. You can use tokens in your tag values to add info from Mautic automatically.

When you're done, click Save & Close to keep your changes.

FAQ

Can I personalize my UTM tags?

Yes! You can set UTM tags for each channel (like Email, Dynamic Content, or Focus). You can also use tokens to add dynamic values, such as the name of your email or campaign.

What if my links already have UTM tags?

No worries! The plugin will not change or overwrite UTM tags that are already in your links. It only adds tags if they are missing.

Which tokens can I use?

You can use tokens for email, campaign, contact, and more. For example:

  • {contactfield=firstname} for a contact's first name
  • {emailfield=name} for the email name
  • {campaignfield=name} for the campaign name
What does "Automatically add UTM tags during creating new form" mean?

This means the plugin will fill in UTM tag fields for you when you create a new email, dynamic content, or focus item. You don't have to type them in every time.

What does "Automatically append UTM parameters to URLs if not exist" mean?

This means the plugin checks every link. If a link doesn't have UTM tags, it will add them for you. This way, all your links have the right tracking tags automatically.