# Automatically Tag Based on Domain?

**URL:** https://integration.keap.com/t/automatically-tag-based-on-domain/7736
**Category:** Max Classic
**Tags:** tags
**Created:** [July 30, 2017, 5:33am UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736 "2017-07-30T05:33:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![K\_Tko](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@K\_Tko](https://integration.keap.com/u/K_Tko)
#### Post date: [July 30, 2017, 5:33am UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736/1 "2017-07-30T05:33:56Z")

</div>

Hey all!

Is it possible to automatically apply a tag to a new contact based on their domain (or any text in their email address)?

For example: A contact who opts-in with email [name@usa.gov](mailto:name@usa.gov) would be tagged as a Government.

Tried searching and couldn’t find anything.

Thanks!

K

---

<div class="post-metadata">

### Author: ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)
#### Post date: [July 31, 2017, 5:28am UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736/2 "2017-07-31T05:28:15Z")

</div>

We wrote a script that does that by full (ex @gmail.com) so it can be done. You could use decision diamonds and “contains” “.gov” and the like if you know the ones you’re looking for

---

<div class="post-metadata">

### Author: ![K\_Tko](https://avatars.discourse-cdn.com/v4/letter/k/76d3ee/32.png) [@K\_Tko](https://integration.keap.com/u/K_Tko)
#### Post date: [July 31, 2017, 6:15pm UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736/3 "2017-07-31T18:15:12Z")

</div>

Thanks, John! I’ll try this out.

Is it possible to make the action tag the contact so that another campaign (outside of the current one that tags them) is sent to that contact?

For example, in the main opt-in nurture campaign, if the tag “Government” is applied, they’ll be sent a “Government” campaign separate from the main opt-in nurture campaign.

---

<div class="post-metadata">

### Author: ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)
#### Post date: [July 31, 2017, 6:26pm UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736/4 "2017-07-31T18:26:17Z")

</div>

You would just use the “Government” tag as a starting goal for any subsequent campaign

---

<div class="post-metadata">

### Author: ![Jacob\_Avolio](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@Jacob\_Avolio](https://integration.keap.com/u/Jacob_Avolio)
#### Post date: [July 13, 2018, 3:36pm UTC](https://integration.keap.com/t/automatically-tag-based-on-domain/7736/5 "2018-07-13T15:36:37Z")

</div>

Hi John, where can I find this script?

Thanks
