SFMC TIP | How to publish cloud page immediately

Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks
2 minutes read

You know the struggle when developing a cloud page application and trying to debug some issues or make changes. You publish the cloud page and wait and wait. Sometimes it takes ages, and other times it is right away. Why does this happen? How can we make it work immediately?

Why we have to endure this?

To answer why, I have found, while browsing the vast internet, that cloud pages are server-cached for performance reasons. Why Salesforce did not introduce a development mode for cloud pages, we do not know, and until that day, we will have to live with workarounds.

Before today, the day I have learnt the ultimate workaround of all time, I was using pretty blunt workarounds, or just waited or went for coffee, or just stared into the wall.

My workarounds before the relevation:

  • Created the cloud always as a new landing page – this way there is no cache
  • Changed the path of the URL component – you need to unpublish, change the path, and publish again.
  • I prayed to the Lord Jesus, so this time it will take less than before. /s



Unpublish page to change path in url to avoid caching
The Solution

The solution has one prerequisite, and that is to have your own web server. I suppose there are plenty of free web servers where you can quickly load HTML code, and it will happily present it to the public.

Your cloud page will only have following code:

%%=TreatAsContent(HTTPGET("https://sfmc.martechnotes.com"))=%%

On the subdomain / domain / web hosting to index.html load you actual html with SSJS, AMPScript.

This way, only the one line of code is cached, and everything else is pulled dynamically every time. As a result, your changes will be reflected every time you update the index.html file on your web server. Isn’t it amazing?

The Solution 2

In case you do not have access to your own web server, you can refer to content blocks that are not cached. This will ensure immediate effects on any changes to your web application. In AMPScript the changes are following:

%%=TreatAsContent(ContentBlockByKey("content-block-customer-key"))=%%

If you fancy SSJS you can use following snippet:

<script runat="server">
Platform.Load("Core","1.1.1");
    var cloudPageCode = Platform.Function.ContentBlockByKey("content-block-customer-key");
    Write(TreatAsContent(cloudPageCode));     
</script>
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

ACC TIP | Troubleshooting web applications

1 minute read

When building any web application (webapp), you may have experienced a syntax error on, for example, line 200. This can be perplexing, especially when your custom JavaScript code does not even have 200 lines. Why is that? The reason for this discrepancy is that the web applications you create in the visual editor are compiled … Read more

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

ACC TIP | Column must appear in GROUP BY clause

1 minute read

Creating aggregated data reports may not be a daily task, but there are times when you might be tasked with generating such reports. For instance, you could group and track log clicks to create the coveted ‘Hot Clicks Report’. You tell yourself, ‘It’s nothing major,’ and believe you have an idea of how to do … Read more

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

ACC TIP | Fast select field in query builder

less than a minute read

Working with Adobe Campaign Classic often involves frequent mouse movements and clicks. However, after a while, you’ll discover certain tricks to work with this tool more efficiently and quickly. Today, I’ll show you a simple trick that will help you enter fields in the query builder faster and without having to move your mouse across … Read more

Continue reading
Adobe Campaign Classic enrichment activity
Adobe Campaign, Marketing Automation

ACC Activity | How to use enrichment

6 minutes read

The Enrichment activity in Adobe Campaign Classic is a versatile tool that allows campaign managers to enrich their targeting data with additional information from various data sources. In technical terms, the Enrichment activity can be likened to performing a JOIN operation. A JOIN operation is a fundamental concept in database management systems (DBMS), where data … Read more

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

SFMC TIP | How to use AMPScript functions in SSJS

3 minutes read

Have you ever wondered, while working with SSJS, if there was a function in SSJS similar to the one you use in AMPscript? What if I told you that you can bring native AMPscript functions to SSJS? Today, I will show you how to incorporate the best features from both scripting worlds into SSJS automation, … Read more

Continue reading