# Problem with Lead Tracking

**URL:** <https://forum.mautic.org/t/problem-with-lead-tracking/2552>\
**Category:** Product Support\
**Created:** [October 20, 2015, 11:22pm UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552 "2015-10-20T23:22:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![domainero](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@domainero](https://forum.mautic.org/u/domainero)\
**Post date:** [October 20, 2015, 11:22pm UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552/1 "2015-10-20T23:22:39Z")

</div>

Hi everyone,  
  
  
  
I’m trying to track logged in users & update their points based on the pages they view.  
  
  
  
Now, either I’m missing something huge or there is some bug around.  
  
  
  
I added tracking pixel to every page on my project. The tracking pixel is similar to this:

Code:

$mautic\_tracking\_pixel\_data = urlencode(base64\_encode(serialize(array( 'page\_url' =\> $\_SERVER['REQUEST\_URI'], 'email' =\> $customer\_data-\>email // Use your website's means of user management to retrieve the email ))));

\<img src="[https://domainero.mautic.com/mtracking.gif?d={$mautic\_tracking\_pixel\_data}](https://domainero.mautic.com/mtracking.gif?d=%7B%24mautic_tracking_pixel_data%7D) style=“display: none;” /\>

  
This code doesn't recognize user by Email and instead shows that visitor was Anonymous. I tried this code as well:  

Code:

https://domainero.mautic.com/mtracking.gif?page\_url=http%3a%2f%2fyourdomain.com%2fyour-product-page&page\_title=Some Cool Product&email=a@example.com

  
This didn't work either at firs and after a bit of google-ing, it turned out I need to make the "email" field Publicly Editable which apparently produced some problems on its own.  
  
Now, my question is - what do I need to do in order to track & identify logged in users?  
  
What I'm trying to do is to simply increase user's Points on each page visit and I'm having really hard time achieving this ...  
  
Any ideas?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 22, 2015, 1:44pm UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552/2 "2015-10-22T13:44:42Z")

</div>

@domainero There is a bug in 1.2.0 which doesn’t save lead data unless a tags attribute is present in the URL query. Here is the fix which will be available in 1.2.1:

[https://github.com/mautic/mautic/pull/885](https://github.com/mautic/mautic/pull/885)

---

<div class="post-metadata">

**Author:** ![domainero](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@domainero](https://forum.mautic.org/u/domainero)\
**Post date:** [October 20, 2015, 11:22pm UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552/3 "2015-10-20T23:22:39Z")

</div>

Hi everyone,

I’m trying to track logged in users & update their points based on the pages they view.

Now, either I’m missing something huge or there is some bug around.

I added tracking pixel to every page on my project. The tracking pixel is similar to this:

```auto
$mautic_tracking_pixel_data = urlencode(base64_encode(serialize(array(
            'page_url' => $_SERVER['REQUEST_URI'],
            'email' => $customer_data->email // Use your website's means of user management to retrieve the email
        ))));

<img src="https://domainero.mautic.com/mtracking.gif?d={$mautic_tracking_pixel_data} style="display: none;" />
```

This code doesn’t recognize user by Email and instead shows that visitor was Anonymous. I tried this code as well:

```auto
https://domainero.mautic.com/mtracking.gif?page_url=http%3a%2f%2fyourdomain.com%2fyour-product-page&page_title=Some Cool Product&email=a@example.com
```

This didn’t work either at firs and after a bit of google-ing, it turned out I need to make the “email” field Publicly Editable which apparently produced some problems on its own.

Now, my question is - what do I need to do in order to track & identify logged in users?

What I’m trying to do is to simply increase user’s Points on each page visit and I’m having really hard time achieving this …

Any ideas?

Thanks

---

<div class="post-metadata">

**Author:** ![ramez\_rafla](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@ramez\_rafla](https://forum.mautic.org/u/ramez_rafla)\
**Post date:** [October 21, 2015, 12:12am UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552/4 "2015-10-21T00:12:46Z")

</div>

@domainero ,  
As you mentioned, the email field needs to be publicly editable.  
However, the lead has to already exist in the leads list. Right now, Mautic needs a formal input of a lead, either via a form or a list input. So you will have to work out the handshake from your site to mautic somehow before the lead gets tracked.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/problem-with-lead-tracking/2552/5 "2020-02-02T22:57:36Z")

</div>


