# Link Wrapping

**URL:** https://forum.mautic.org/t/link-wrapping/1503
**Category:** General Discussion
**Created:** [February 5, 2015, 7:22pm UTC](https://forum.mautic.org/t/link-wrapping/1503 "2015-02-05T19:22:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![freak3dot](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freak3dot](https://forum.mautic.org/u/freak3dot)
#### Post date: [February 5, 2015, 7:22pm UTC](https://forum.mautic.org/t/link-wrapping/1503/1 "2015-02-05T19:22:13Z")

</div>

It would be useful to be able to wrap links with Mautic for the purpose of tracking clicks. The main reason that I’m thinking this is for Twitter and maybe Facebook links.  
  
  
  
I would consider it a bonus if I could use a short domain with it. However, that isn’t necessary. I can always use another shortener. Twitter will [t.co](http://t.co) them anyways.  
  
  
  
The goal would be to know if the same people browsing the website are coming from links in social media feeds. So, it would be good to be able to put some notes on the link wrapper in Mautic.  
  
  
  
I’m still in the mindset that I’ll use Mautic to capture everything. This seems link a fairly small feature with big reward.

---

<div class="post-metadata">

### Author: ![freak3dot](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freak3dot](https://forum.mautic.org/u/freak3dot)
#### Post date: [February 5, 2015, 7:22pm UTC](https://forum.mautic.org/t/link-wrapping/1503/2 "2015-02-05T19:22:13Z")

</div>

It would be useful to be able to wrap links with Mautic for the purpose of tracking clicks. The main reason that I’m thinking this is for Twitter and maybe Facebook links.

I would consider it a bonus if I could use a short domain with it. However, that isn’t necessary. I can always use another shortener. Twitter will [t.co](http://t.co) them anyways.

The goal would be to know if the same people browsing the website are coming from links in social media feeds. So, it would be good to be able to put some notes on the link wrapper in Mautic.

I’m still in the mindset that I’ll use Mautic to capture everything. This seems link a fairly small feature with big reward.

---

<div class="post-metadata">

### Author: ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)
#### Post date: [February 5, 2015, 7:54pm UTC](https://forum.mautic.org/t/link-wrapping/1503/3 "2015-02-05T19:54:26Z")

</div>

Is this within a landing page or email? If so, it’s already there. If using the builder, under the landing page list, you’ll see “External Link”. Drag that over, drop, then fill in the URL. It’ll be converted to a trackable redirect.

If you’re using the custom html, then you can use the token {externallink=http://google.com}

We do not have any url shorteners implemented but that would be a good feature. Would you be willing to add that to the github issues with a Feature Request label?

Thanks!  
Alan

---

<div class="post-metadata">

### Author: ![freak3dot](https://avatars.discourse-cdn.com/v4/letter/f/9de0a6/32.png) [@freak3dot](https://forum.mautic.org/u/freak3dot)
#### Post date: [February 5, 2015, 8:43pm UTC](https://forum.mautic.org/t/link-wrapping/1503/4 "2015-02-05T20:43:13Z")

</div>

The link I want to track will be a link used on social media. The link will “land” on a page within a Wordpress site on the same domain as Mautic (different folder).

Let me know if I understand your response correctly. I would have to create a landing with the magic token {externallink=http://www.example.com/widgets/} and the user would have to click again after already having clicked the link from a twitter tweet?

Example Tweet: Check out my awesome page on [widgets](http://www.example.com/widgets/).

To make it work technically, I’d want to wrap [http://www.example.com/widgets/](http://www.example.com/widgets/) in something to track clicks. Wrapped, it would be something like [http://www.example.com/mautic/linktrack/1yxb0s1](http://www.example.com/mautic/linktrack/1yxb0s1) that would go to a script to snag the user IP, do the mautic lead magic, finally return a redirect to the original url.

---

<div class="post-metadata">

### Author: ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)
#### Post date: [February 5, 2015, 11:52pm UTC](https://forum.mautic.org/t/link-wrapping/1503/5 "2015-02-05T23:52:41Z")

</div>

Oh! Gotcha now. Unfortunately, I wasn’t thinking about links being used outside the context of landing pages and emails when we wrote in that feature. It makes sense though to use them outside of those two contexts so we definitely need to add a UI to generate/access redirects for 3rd party use.

Could you do me a favor and add that as another feature request? We won’t be able to get to it before we get 1.0 out the door (otherwise we will never get this thing done 🙂 but it’ll definitely make it into 1.1.

If you want to look at the source that drives the generation of redirect URLs, take a look at

[https://github.com/mautic/mautic/blob/master/app/bundles/PageBundle/Model/RedirectModel.php#L53](https://github.com/mautic/mautic/blob/master/app/bundles/PageBundle/Model/RedirectModel.php#L53)  
[https://github.com/mautic/mautic/blob/master/app/bundles/PageBundle/Model/RedirectModel.php#L37](https://github.com/mautic/mautic/blob/master/app/bundles/PageBundle/Model/RedirectModel.php#L37)

Thanks!  
Alan

---

<div class="post-metadata">

### Author: ![buckhornmktg](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@buckhornmktg](https://forum.mautic.org/u/buckhornmktg)
#### Post date: [August 15, 2015, 3:31am UTC](https://forum.mautic.org/t/link-wrapping/1503/6 "2015-08-15T03:31:56Z")

</div>

This would be an awesome feature, especially with a URL shortener.

You could use the URL shortener as a strategy to publicize [Mautic.com](http://Mautic.com). Imagine this link shared on Twitter being retweet hundreds of times…

[http://mautic.com/65787920](http://mautic.com/65787920)

For the self install the URL shortener should be the hostname or custom shorter domain name. E.g.

[http://buckhornmarketing.com/36789305](http://buckhornmarketing.com/36789305)  
or  
[http://buckhorn.to/36789305](http://buckhorn.to/36789305)

And of course it would be nice to have a simple report showing the total number clicks on each link, not just leads who clicked.

I would even like an additional feature which would would also add the Google Analytics link tracking. That would look something like this:

This link is clicked which handles the Mautic tracking vars (like the tracking pixel).  
[http://mautic.com/65787920](http://mautic.com/65787920)

Then the user is 301 redirected to the destination link which optionally has the Google Analytics tracking vars appended.  
[http://mautic.com/signup/new/?utm\_source=twitter&utm\_medium=tweet&utm\_campaign=half%20off%20sale&utm\_term=marketing%20automation&utm\_content=twitter%20coupon](http://mautic.com/signup/new/?utm_source=twitter&utm_medium=tweet&utm_campaign=half%20off%20sale&utm_term=marketing%20automation&utm_content=twitter%20coupon)

---

<div class="post-metadata">

### Author: ![DPalmer](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@DPalmer](https://forum.mautic.org/u/DPalmer)
#### Post date: [January 6, 2017, 5:58pm UTC](https://forum.mautic.org/t/link-wrapping/1503/7 "2017-01-06T17:58:52Z")

</div>

I know this is an old post, but with the current version of Mautic you can create an asset with a remote URL address set to the website address you want to go to.

Darryl

---

<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:58pm UTC](https://forum.mautic.org/t/link-wrapping/1503/8 "2020-02-02T22:58:51Z")

</div>


