Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

SFMC TIP | Invalid links in HTML

SFMC tips and tricks

When the HTML template is used (loading your own HTML code) all the links that use query parameters (?a=b) will resolve to invalid links when they redirect upon user click. This happens when web analytics UTM tags are being attached to the delivery.

To resolve this issue all the links with additional query parameters has to be written to the href tag with use of AMPScript RedirectTo function.

<a href="%%=RedirectTo("https://martechnotes.com?parameter=1")=%%">Click here</a>

When you are using regular email template where you drag and drop components, the same is happening when you are using URL as variable or attribute in e.g. button component, such URLs will resolve to invalid ones.

Easy and same fix. Just wrap your url in RedirectTo

Redirect to when URL is attribute or variable

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.

#AMPScript #programming
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in solving problems, automating processes, and driving innovation in my clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified).

Additionally, I serve as a community advisor for Adobe Campaign, offering expert insights and guidance.

In addition to my professional pursuits, I also enjoy exploring various programming languages, CMSs, and frameworks, further enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

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

Similar posts that you may find useful

SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

How to Link Journey to Delivery in SFMC

1 minute read

In Salesforce Marketing Cloud, you can link the customer journey to delivery using data views. Custom views that contain e.g. all tracking information. Here are some steps you can follow to link the journey to delivery using data views: This SQL view will return data such as the subscriber key, event date, journey and activity […]

Continue reading
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign

Campaign 101: Reselect temporary schema in query

less than a minute read

When working with the Query activity in Adobe Campaign Classic, you have the choice to select either the Temporary schema or the Database schema. If you opt for the Temporary schema, it is essential to reselect it even if it is preselected with a default value. Here’s why it’s important to explicitly reselect the Temporary […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

Use client-side JavaScript in content block

less than a minute read

Recently, I attempted to reference a content block from a cloud page that contained client-side JavaScript, and to my surprise, Salesforce Marketing Cloud removed it entirely. I did some investigation, and lo and behold, it’s actually a common “feature”. With that in mind, I’ve found a simple workaround on YouTube. Let’s take a look at […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

Journey validation fails for no reason

less than a minute read

There is an error with starting the journey, specifically related to the email template, but it gives you no explanation whatsoever. I’m sure there can be many problems with the template that prevent the journey from being started. One of the problems I have experienced most recently is that the template has not been approved. […]

Continue reading
Queries in SSJS and AMPScript
Marketing Automation, Salesforce Marketing Cloud

Query data extensions with SSJS and AMPScript

1 minute read

There’s another topic for which official documentation often lacks sufficient information, but it can be incredibly useful when needed. It’s important to note that in AMPScript, we use the data extension name to reference the table for any query. On the other hand, in SSJS, we utilize the data extension’s external key to reference the […]

Continue reading