🔥 500+ people already subscribed. Why not you? Get our newsletter with handy code snippets, tips, and marketing automation insights.

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 SSJS skill for you.

Sign up now to get an SSJS skill that can be used with your AI companion

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

Share With Others

The Author
Marcel Szimonisz

Marcel Szimonisz

MarTech consultant

I specialize in solving problems, automating processes, and driving innovation through major marketing automation platforms, particularly Salesforce Marketing Cloud and Adobe Campaign.

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

Buy me a coffee
Subscribe

Get exclusive tips, scripts and news

Choose your topics

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

Similar posts