# Tracking links send from twitter (new plugin)

**URL:** <https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003>\
**Category:** Development\
**Created:** [February 21, 2020, 12:21pm UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003 "2020-02-21T12:21:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kico/32/1771_2.png) [@kico](https://forum.mautic.org/u/kico)\
**Post date:** [February 21, 2020, 12:21pm UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/1 "2020-02-21T12:21:59Z")

</div>

Hi everyone.  
I have developed a extended plugin to send Direct Messages at twitter. First I follow mentions and my plugin send a Direct Message with one link to my site. It works perfectly and the customer receive the link. If they click do these redirects:  
302 [https://www.mysite.es/mautic/r/112fc040261e242521d967177?ct=YToyOntzOjY6InNvdXJjZSI7YToyOntpOjA7czo4OiJjYW1wYWlnbiI7aToxO2k6MzI7fXM6NzoiY2hhbm5lbCI7YToxOntzOjE0OiJzb2NpYWxfdHdpdHRlciI7aTo2O319](https://www.mysite.es/mautic/r/112fc040261e242521d967177?ct=YToyOntzOjY6InNvdXJjZSI7YToyOntpOjA7czo4OiJjYW1wYWlnbiI7aToxO2k6MzI7fXM6NzoiY2hhbm5lbCI7YToxOntzOjE0OiJzb2NpYWxfdHdpdHRlciI7aTo2O319) server\_redirect temporary [https://www.mysite.es/page](https://www.mysite.es/page)

They pass throught mautic and I spected they merge the user detected by the social monitoring with the user I have already with their mail. but mautic dont merge both contacts. am i missing something? How can I make merge contacts to have only one user with his twitter and email.  
Thx

---

<div class="post-metadata">

**Author:** ![renzof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/renzof/32/1738_2.png) [@renzof](https://forum.mautic.org/u/renzof)\
**Post date:** [February 22, 2020, 5:21pm UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/2 "2020-02-22T17:21:12Z")

</div>

Hi Kiko,

Is the Twitter handle caupture by mautic? if then maybe you should set the Twitter handle under custom fields to be unique?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/c0fc3c4a9d73b44c123bad85742bf3b83a414e04.png)

---

<div class="post-metadata">

**Author:** ![kico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kico/32/1771_2.png) [@kico](https://forum.mautic.org/u/kico)\
**Post date:** [February 24, 2020, 7:19am UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/3 "2020-02-24T07:19:39Z")

</div>

> [@renzof](#):
>
> Is the Twitter handle caupture by mautic? if then maybe you should set the Twitter handle under custom fields to be unique?

Yes Mautic capture the Twitter. I will try your solution but I dont feel using twitter as id could help to merge contacts

---

<div class="post-metadata">

**Author:** ![kico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kico/32/1771_2.png) [@kico](https://forum.mautic.org/u/kico)\
**Post date:** [February 25, 2020, 10:06am UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/4 "2020-02-25T10:06:54Z")

</div>

> [@kico](#):
>
> your solution but I dont feel using twitter as id could help to merge contacts

I tried but make twitter unique id dont merge contactats. I need they merge contacts that have the same cookie one because they clicked one email and other because they clicked a direct mesage in twitter.

---

<div class="post-metadata">

**Author:** ![renzof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/renzof/32/1738_2.png) [@renzof](https://forum.mautic.org/u/renzof)\
**Post date:** [February 26, 2020, 10:58am UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/5 "2020-02-26T10:58:29Z")

</div>

Shame, sorry I thought that might work.

I think the contact will not always share the same cookies, for example if they open the link from the twitter app the page opens on a twitter version of a browser so that would generate a new cookie with a different fingerprint as well.

I think I read somewhere that you can pass the email on they link that the click matches that contact, though I can find page where I seen it. Maybe someone else knows what I am talking about and can help?

I’ll edit the post if I find it

---

<div class="post-metadata">

**Author:** ![kico](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kico/32/1771_2.png) [@kico](https://forum.mautic.org/u/kico)\
**Post date:** [February 27, 2020, 2:05pm UTC](https://forum.mautic.org/t/tracking-links-send-from-twitter-new-plugin/13003/6 "2020-02-27T14:05:15Z")

</div>

Thank you,

I feel something is not working because I feel one user that come form one link must merge if it had already one cookie.

User pp@pp.es with cookie:00000  
Another user created via social monitoring but never visited the web site @pp

Then I send one direct message to @pp with one link that take the user to mautic. I hoped in this moment Mautic merge both contacts but it dont do that and count the visit to user pp@pp.es
