# Email URL tracking

**URL:** https://forum.mautic.org/t/email-url-tracking/2892
**Category:** General Discussion
**Created:** [December 2, 2015, 6:09pm UTC](https://forum.mautic.org/t/email-url-tracking/2892 "2015-12-02T18:09:19Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![dbeyzade](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@dbeyzade](https://forum.mautic.org/u/dbeyzade)
#### Post date: [December 2, 2015, 6:09pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/1 "2015-12-02T18:09:19Z")

</div>

Hi,  
  
  
  
Just setup Mautic and its great. If I send an email with a link to my website with the image tracker installed. Do I get information for that user as to what pages the exact pages they looked at and how many? Can’t find any information about this. Or does it just say yes they clicked the link and that is it…  
  
  
  
Thank you  
  
  
  
Daniel

---

<div class="post-metadata">

### Author: ![dbeyzade](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@dbeyzade](https://forum.mautic.org/u/dbeyzade)
#### Post date: [December 2, 2015, 6:09pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/2 "2015-12-02T18:09:19Z")

</div>

Hi,

Just setup Mautic and its great. If I send an email with a link to my website with the image tracker installed. Do I get information for that user as to what pages the exact pages they looked at and how many? Can’t find any information about this. Or does it just say yes they clicked the link and that is it…

Thank you

Daniel

---

<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: [December 3, 2015, 11:19am UTC](https://forum.mautic.org/t/email-url-tracking/2892/3 "2015-12-03T11:19:51Z")

</div>

Yes, if you send an email with some links, Mautic will show you stats of how many leads clicked each link. The links even doesn’t have to point to your website with the tracking pixel installed.

---

<div class="post-metadata">

### Author: ![dbeyzade](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@dbeyzade](https://forum.mautic.org/u/dbeyzade)
#### Post date: [December 4, 2015, 11:31am UTC](https://forum.mautic.org/t/email-url-tracking/2892/4 "2015-12-04T11:31:05Z")

</div>

I understand this - but I want to know if for example the user clicks from the email to our home pages, this is registered as a click in Mautic. However if they continue navigating our website is it also tracked which pages they visited and for how long…

Thank you

---

<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: [December 4, 2015, 1:24pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/5 "2015-12-04T13:24:21Z")

</div>

I probably don’t understand what is the problem. I can only repeat myself. If a lead clicks a link in an email sent by Mautic, this click will be visible in the email detail. If a lead visits your page with the Mautic tracking pixel installed, Mautic will track that visit. For how long? There is no limit. Mautic tracks every click. Try it and you’ll see.

---

<div class="post-metadata">

### Author: ![dbeyzade](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@dbeyzade](https://forum.mautic.org/u/dbeyzade)
#### Post date: [December 4, 2015, 5:18pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/6 "2015-12-04T17:18:38Z")

</div>

Thank you for your help. I have tried it. The problem is that after the initial click from the email the following clicks around the website are not registered to this lead - only the first click is. The rest of the clicks are appearing as a new anonymous lead via IP address as if it is a different visitor.

I wanted to know if this is expected behaviour or a configuration error.

Thank you

---

<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: [December 4, 2015, 7:47pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/7 "2015-12-04T19:47:30Z")

</div>

The lead has the first click tracked in her lead detail page, but the rest not? It doesn’t make any sense. Maybe take a look at

[https://www.mautic.org/docs/pages/troubleshooting.html](https://www.mautic.org/docs/pages/troubleshooting.html)

if it helps.

---

<div class="post-metadata">

### Author: ![dbeyzade](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@dbeyzade](https://forum.mautic.org/u/dbeyzade)
#### Post date: [December 4, 2015, 8:19pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/8 "2015-12-04T20:19:19Z")

</div>

Maybe if I ask like this.

After the first click from the email, are subsequent clicks beyond that tracked to the same user?

---

<div class="post-metadata">

### Author: ![craigthewebguy](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@craigthewebguy](https://forum.mautic.org/u/craigthewebguy)
#### Post date: [March 26, 2016, 7:02pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/9 "2016-03-26T19:02:54Z")

</div>

If it’s any help

I had a case where I didn’t set my url in the WP Mautic plugin settings, for the site I was linking to, to include the “www” and exactly match my mastic install’s url. As a result, the tracking gif, on the site I was linking to, gave me a 304 code in Firefox but gave me a 200 code in Chrome. After changing the plugin settings to include the “www” I received a 200 response from the gif in both Chrome and Firefox fro the site I was linked to from my email…

---

<div class="post-metadata">

### Author: ![ABCW](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@ABCW](https://forum.mautic.org/u/ABCW)
#### Post date: [March 29, 2016, 11:15am UTC](https://forum.mautic.org/t/email-url-tracking/2892/10 "2016-03-29T11:15:30Z")

</div>

hi. This will certainly help you. (Apologize for my english, I am french!).

If your lead was created in your Mautic Back-end you can’t really track what happens after the “Open email” Event. The tracking pixel (Gif) in the email template is not a script of cookie injection. To solve your problem you can use this method (It is used to prepopulate forms on a Mautic Landing page) :

- Turn Email field to “Publicly updatable”.

- In your email builder you must always add this param in the end of every link ?email={leadfield=email|true}  
Now every link like [www.mywebsite.com](http://www.mywebsite.com) will automatically become [www.mywebsite.com?email=xxx@xxx.com](http://www.mywebsite.com?email=xxx@xxx.com)

-The last task is to change your pixel (We have our own JS and PHP script to generate pixels), to take every param [email=xxx@xxx.com](mailto:email=xxx@xxx.com) in the pixel and so populate your publicly updatable filed (Email).

So after this : create a lead in the Mautic back-end ==\> Send an email with a tracked link ==\> your lead will click on it ==\> Mautic will create an anonymous lead ==\> Pixel will populate your email field ==\> Mautic will merge the 2 leads.

---

<div class="post-metadata">

### Author: ![sparker](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sparker](https://forum.mautic.org/u/sparker)
#### Post date: [March 30, 2016, 1:38am UTC](https://forum.mautic.org/t/email-url-tracking/2892/11 "2016-03-30T01:38:56Z")

</div>

I have a question concerning Link-Tracking and whether it is currently possible or planned:  
I want to send Reminder-E-Mails to the Leads, who did not click onto a specific Link in an Email  
(not the visited Link-pages with the Tracking-Pixel - most of the Links are external and I cannot place a Tracking-Pixel on them)

In the Decision-Tab of the Campaign-Builder I don’t have this option.  
Is there a possibility?

---

<div class="post-metadata">

### Author: ![retruco](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/retruco/32/1165_2.png) [@retruco](https://forum.mautic.org/u/retruco)
#### Post date: [November 2, 2016, 4:28am UTC](https://forum.mautic.org/t/email-url-tracking/2892/12 "2016-11-02T04:28:21Z")

</div>

[quote=9159:@ABCW]hi. This will certainly help you. (Apologize for my english, I am french!).

If your lead was created in your Mautic Back-end you can’t really track what happens after the “Open email” Event. The tracking pixel (Gif) in the email template is not a script of cookie injection. To solve your problem you can use this method (It is used to prepopulate forms on a Mautic Landing page) :

- Turn Email field to “Publicly updatable”.

- In your email builder you must always add this param in the end of every link ?email={leadfield=email|true}  
Now every link like [www.mywebsite.com](http://www.mywebsite.com) will automatically become [www.mywebsite.com?email=xxx@xxx.com](http://www.mywebsite.com?email=xxx@xxx.com)

-The last task is to change your pixel (We have our own JS and PHP script to generate pixels), to take every param [email=xxx@xxx.com](mailto:email=xxx@xxx.com) in the pixel and so populate your publicly updatable filed (Email).

So after this : create a lead in the Mautic back-end ==\> Send an email with a tracked link ==\> your lead will click on it ==\> Mautic will create an anonymous lead ==\> Pixel will populate your email field ==\> Mautic will merge the 2 leads.[/quote]

Just wanted to say thanks to ABCW.

I was having the same problem as OP and your tip set me on the right path. Also, I wanted to add that that last javascript thing is really easy to do through Google Tag Manager.

Here’s what I did:

- First you need to create a URL variable that grabs the query (I called mine ‘email query’).

Name: email query  
Variable type: URL  
Query Key: email

- Then I setup two triggers: one for when the query is not set (that one will trigger the regular Mautic JS); and another one for when the query is set (which will trigger the modified Mautic JS)

Name: Email Query UNDEFINED  
Trigger type: Page View  
Conditions: ‘email query’ equals undefined

Name: Email Query DEFINED  
Trigger type: Page View  
Conditions: ‘email query’ does not equal undefined

- Ok, the last step is to create the actual tags. The first one is just your good old regular Mautic JavaScript inside a Custom HTML Tag. You will trigger this one, when the email query is undefined (set the trigger to “Email Query UNDEFINED”) . You can then duplicate the tag, edit one line of code to include the email query, and set the trigger to “Email Query DEFINED”.

And here’s that line you need to change on this second tag:

change:  
mt(‘send’, ‘pageview’);  
to:  
 mt(‘send’, ‘pageview’,{email: ‘{{email query}}’});

And that’s it. 🙂

---

<div class="post-metadata">

### Author: ![rikk03](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@rikk03](https://forum.mautic.org/u/rikk03)
#### Post date: [January 31, 2017, 3:57am UTC](https://forum.mautic.org/t/email-url-tracking/2892/13 "2017-01-31T03:57:15Z")

</div>

@ABCW regarding your updated tracking, what would happen if the email was forwarded to someone else, then opened and then links are clicked?

---

<div class="post-metadata">

### Author: ![sergio-bolinches](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sergio-bolinches](https://forum.mautic.org/u/sergio-bolinches)
#### Post date: [September 13, 2017, 2:06pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/14 "2017-09-13T14:06:31Z")

</div>

Thank you very much @ABCW. I was trying to understand that I was failing with e-mail messages when I introduced the contacts details manually, so I could not track leads. With your trick, all is like i imagined XD

---

<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:56pm UTC](https://forum.mautic.org/t/email-url-tracking/2892/15 "2020-02-02T22:56:39Z")

</div>


