# Add contact to segment based on URL visit?

**URL:** https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621
**Category:** General Discussion
**Created:** [August 13, 2020, 4:41am UTC](https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621 "2020-08-13T04:41:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![oguruma](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/oguruma/32/1003_2.png) [@oguruma](https://forum.mautic.org/u/oguruma)
#### Post date: [August 13, 2020, 4:41am UTC](https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621/1 "2020-08-13T04:41:32Z")

</div>

Mautic is successfully creating contacts when visitors visit a page. I want to add all contacts that visit [url.com](http://url.com) to a segment called “site visitors”.

I thought that setting up a filter of “Visited URL \> contains: [url.com](http://url.com)” would put all of the contacts into the segment, however none of the contacts are being added with that filter, even though they have visited “[url.com](http://url.com)”.

How do I automatically all add all site visitors to a segment?

---

<div class="post-metadata">

### Author: ![malcolm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malcolm/32/39_2.png) [@malcolm](https://forum.mautic.org/u/malcolm)
#### Post date: [August 19, 2020, 5:46am UTC](https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621/2 "2020-08-19T05:46:58Z")

</div>

I’m doing something similar, but using a campaign.

In the URL field of the Visits a Page trigger I’m using a wildcard of, in my case, \*salesforce\*, so that if they visit any page on my site with salesforce in the URL it matches. Then I have an action to tag them (I mostly have dynamic segments based on tags)

---

<div class="post-metadata">

### Author: ![namratasaun](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/namratasaun/32/2801_2.png) [@namratasaun](https://forum.mautic.org/u/namratasaun)
#### Post date: [February 14, 2021, 9:31am UTC](https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621/3 "2021-02-14T09:31:10Z")

</div>

visited url segments are really slow to update. anyone else facing this?

---

<div class="post-metadata">

### Author: ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)
#### Post date: [February 15, 2021, 4:06pm UTC](https://forum.mautic.org/t/add-contact-to-segment-based-on-url-visit/15621/4 "2021-02-15T16:06:28Z")

</div>

Yeah, that’s relative 🙂 Imagine how many lines of SQL you need to sweep through.  
But yes, you should not use it for many segments all the time.
