background shape
background shape

Track links that are AMPScript variables

When you save links as part of an HTML code in an AMPScript variable, such as a paragraph containing a link to a page, you may face challenges in tracking these links.

Salesforce offers a great feature that allows tracking of such links using the “httpgetwrap” inserted right before the URL protocol.

href="httpgetwrap|https://martechnotes.com"

When dealing with AMPScript variables containing links for tracking, it is crucial to use the TreatAsContent() function instead of the v() function. This way, both the link and the tracking will work seamlessly.

%%[
SET @note = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. <a href='httpgetwrap|https://martechnotes.com'>Vestibulum</a> eu lorem vel tortor mattis convallis. Etiam vulputate pharetra varius.</p>
]%%

%%=TreatAsContent(@note)=%%

GOOD TO KNOW

One important aspect to take into account when utilizing the “httpgetwrap” feature is its limitation in tracking only the first 100 unique URLs in the send. If you combine the prefix with Parameter Manager, it’s highly improbable that the click activity on these prefixed links will be fully tracked.

There is no longer a requirement to contact support for enabling this feature, as was the case in the past. Nowadays, the feature is automatically enabled on business units.

There is no longer a requirement to contact support for enabling this feature, as was the case in the past. Nowadays, the feature is automatically enabled on business units.

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

Share With Others

Leave a Comment

Your email address will not be published. Required fields are marked *

MarTech consultant

Marcel Szimonisz

Marcel Szimonisz

I specialize in solving problems, automating processes, and driving innovation through major marketing automation platforms.

Buy me a coffee
Subscribe

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Read our privacy policy for more info.

If the form isn't cooperating, don't worry. Just drop us an email at info(at)martechnotes(dot)com with 'Subscribe' in the subject line, and we'll be happy to add you to our list. As a token of our appreciation, we'll also send you a free e-book. Your subscription means a lot to us, and we want to ensure you don't miss out on our valuable content.