# Name in anonymous lead

**URL:** https://forum.mautic.org/t/name-in-anonymous-lead/4303
**Category:** Product Support
**Created:** [June 21, 2016, 8:48am UTC](https://forum.mautic.org/t/name-in-anonymous-lead/4303 "2016-06-21T08:48:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![francescjr](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@francescjr](https://forum.mautic.org/u/francescjr)
#### Post date: [June 21, 2016, 8:48am UTC](https://forum.mautic.org/t/name-in-anonymous-lead/4303/1 "2016-06-21T08:48:15Z")

</div>

Hello again,  
  
  
  
I have a test environment and I see that the anonymous contacts, on the “name” it just says “anonymous”, while in another more broad test environment on the “name” it writes down the IP.  
  
  
  
Can somebody tell me why of such difference?  
  
Thanks again!

---

<div class="post-metadata">

### Author: ![francescjr](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@francescjr](https://forum.mautic.org/u/francescjr)
#### Post date: [June 22, 2016, 4:27am UTC](https://forum.mautic.org/t/name-in-anonymous-lead/4303/2 "2016-06-22T04:27:51Z")

</div>

So in one of my environments for some reason, ip are added to the lead. And in the other one, maybe because I am using a local virtual box, not a single ip is added to the lead.

This is the code from Lead entity, in leadbundle that show what is going to display.

`public function getPrimaryIdentifier ($lastFirst = false)
    {
        if ($name = $this->getName($lastFirst)) {
            return $name;
        } elseif (!empty($this->fields['core']['company']['value'])) {
            return $this->fields['core']['company']['value'];
        } elseif (!empty($this->fields['core']['email']['value'])) {
            return $this->fields['core']['email']['value'];
        } elseif (count($ips = $this->getIpAddresses())) {
            return $ips->first()->getIpAddress();
        } elseif ($socialIdentity = $this->getFirstSocialIdentity()) {
            return $socialIdentity;
        } else {
            return 'mautic.lead.lead.anonymous';
        }
    }`

Now I would like in which cases ip’s are not added to the Lead. Can somebody answer that?

---

<div class="post-metadata">

### Author: ![francescjr](https://avatars.discourse-cdn.com/v4/letter/f/c5a1d2/32.png) [@francescjr](https://forum.mautic.org/u/francescjr)
#### Post date: [June 21, 2016, 8:48am UTC](https://forum.mautic.org/t/name-in-anonymous-lead/4303/3 "2016-06-21T08:48:15Z")

</div>

Hello again,

I have a test environment and I see that the anonymous contacts, on the “name” it just says “anonymous”, while in another more broad test environment on the “name” it writes down the IP.

Can somebody tell me why of such difference?  
Thanks again!
