Using a tag or a custom field¶
In Mautic, choosing the right way to store external data is more about how you plan to use that data later rather than just getting it into the system. Each method serves a specific functional purpose in your automation workflow.
Custom Fields¶
Custom fields are the best way to store specific, structured information that is unique to the contact.
Best For: Personalization (using tokens like {contactfield=firstname}), date-based triggers, and specific data points (e.g., "Account Manager," "Last Purchase Date," "Industry").
Pros:
- Merge Tags: You can use this data directly in emails or landing pages to personalize content.
- Data Validation: You can set field types (Date, Number, Select) to ensure data integrity.
- Advanced Filtering: Allows for "Greater than" or "Less than" logic in segments (e.g., "Income > 50000").
Cons:
- Rigid: Adding a new custom field requires admin setup.
- Database Load: Having a lot of custom fields can eventually slow down your Mautic instance.
Tags¶
Tags are lightweight labels used for quick categorization, often reflecting a behavior or a temporary state.
Best For: Tracking actions (e.g., "Attended-Webinar-2024"), source tracking, or "one-off" markers that don't need a dedicated field.
Pros:
- Flexibility: You can create them on the fly during an API call or import without prior setup.
- Easy Automation: Highly effective for "If contact has tag X" switches within a campaign.
- Additive: A contact can have 50 tags without issue, whereas 50 custom fields for the same data would be messy.
Cons:
- No Values: You can't store a "Value" in a tag (e.g., you can tag someone as "Customer," but you can't store their "Order Total" in a tag).
- Messy over time: Without a strict naming convention, you end up with "Webinar-Oct" and "webinar\oct" as two different tags.
Custom fields ↔︎ Tags ↔︎ Segments¶
| Feature | Custom Fields | Tags | Segments |
|---|---|---|---|
| Primary Use | Data Storage | Labeling | Targeting |
| Personalization | Yes (Tokens) | No | No |
| Data Types | Text, Date, Number | String only | Query based |
| Creation | Requires Setup | On-the-fly | Filter Setup |
| Automation | Via "Field Value" | Via "Tag Applied" | Campaign Entry |