Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
11 votes
Accepted

Possible to Set Access-Control-Allow-Origin in an SFMC Landingpage?

I found out a Solution. Its possible to Set the Header using Server-Side JavaScript within the Landingpage. Here is my Header and its working fine now. <script runat=server> Platform.Load("...
Ronald Koch's user avatar
11 votes
Accepted

CSS file upload and store in Marketing Cloud

Within your Cloud Page collection, you can create a Code Resource: After you fill out the name of the code resource, you can select the type, which in your case will be CSS: You will now be able to ...
Lukas Lunow's user avatar
  • 21.6k
10 votes
Accepted

Developing and testing CloudPages

I use the HTTPGET() AMPScript function to pull in the content from an external web server when developing pages. Like this: %%=TreatAsContent(HttpGet(Concat("http://example.com/your-page.html?x=",...
Adam Spriggs's user avatar
  • 30.7k
10 votes
Accepted

Parameters passed in CloudPagesURL

I'd say most (if not all) of the Email, Email Date, Subscriber, and Sender personalization strings are included -- as are any attributes or data extension column names passed over in the send context....
Adam Spriggs's user avatar
  • 30.7k
7 votes
Accepted

Send data from de in email to landing page

You're mixing inline AMPscript notation in an AMPscript block. That won't work. But, you don't need the AMPScript block in your email at all since the CloudPagesURL() function will handle everything....
Adam Spriggs's user avatar
  • 30.7k
6 votes
Accepted

Trigger email from Landing Page via AMPScript

You can use AMPScript and the SOAP API web service to accomplish this. It is fairly easy to do, you create the triggered send in the UI or via SDK or API. Then inside the AMPscript on your page you ...
Gortonington's user avatar
  • 30.6k
6 votes
Accepted

Using AMPscript on Landing Pages

You need to print the variable using %%=v(@id)=%% And not %%[=v(@id)=]%%
zeljazouli's user avatar
  • 1,088
6 votes
Accepted

Assigning BLANK/NULL value for Date field in Marketing cloud - Data extension

This is mandatory and expected behavior. As SFMC data extensions are based off SQL tables, the date/time field types have an auto-assigned default value. By having it empty, the system will default ...
Gortonington's user avatar
  • 30.6k
5 votes

Web Analytics Connector breaking custom unsubscribe page when clicked within email

Here's another workaround for this bug with the CloudPagesURL() function. Within the body of the email that drives the subscriber to the CloudPages landing page, create the query string parameter ...
WR Roush's user avatar
  • 116
5 votes

Receiving HTTP Post data and storing in a Data Extension

If you're comfortable using SSJS, Platform.Request.GetPostData(), conveniently missing from the documentation, will return the whole post body as a string. To parse that data into an object, pass the ...
Clayton VonDras's user avatar
5 votes
Accepted

AMPScript loop in a landing page

To clarify, you don't need a Primary Key when using LookupRows or LookupOrderedRows, but you do need a column in your data to match rows against (which has to be an exact match). This is a little ...
Eliot Harper's user avatar
  • 16.6k
5 votes

How to insert multiple records from Exacttarget microsite to Salesforce?

The SObject Tree only handles single records and you need to use this method for multiple records. However, I'm not sure why you don't simply use the CreateSalesforceObject AMPscript function instead,...
Eliot Harper's user avatar
  • 16.6k
5 votes
Accepted

Created a landing page as code resource for CSS in Marketing cloud Cloud pages. I need to find out the page ID for this page

1. Classic Editor Within CloudPages collection the page ID for CSS can be found by inserting the CSS resource into a landing page. Here are the steps involved: First create a landing page through the ...
Brad Sapkota - altus.digital's user avatar
5 votes
Accepted

Can we capture click activity of links in landing pages and generate reports based on the click activities of these links?

UPDATE 2024: I have created a quite simple solution (easier to implement than the one previously suggested), allowing you to track clicks on Cloud Pages using a combination of SSJS/Ampscript and ...
Lukas Lunow's user avatar
  • 21.6k
5 votes
Accepted

How can I fetch code for a Cloud Page from a file on Dropbox?

Append ?dl=0&raw=1 to the end of the dropbox url and insert between your TreatAsContent and HTTPGet functions as such: %%=TreatAsContent(HTTPGet('https://www.dropbox.com/s/abcdefghijk123/my_page....
Josh de Blank's user avatar
4 votes
Accepted

Landing Page post to itself and run SSJS

There are various ways this might work. Here are a couple of examples... AMPScript %%[ IF @@ExecCtx == "LOAD" THEN]%% <form action="%%=RequestParameter('PAGEURL')=%%"> method="post"> ...
Macca's user avatar
  • 8,236
4 votes
Accepted

Use Javascript on landing page

In this case I'd try to use Javascript within the html page. Basically here is the sample code. I have seen issues when you try to reference js externally using landing pages and microsites which is ...
Brad Sapkota - altus.digital's user avatar
4 votes
Accepted

How does Ampscript RaiseError function work?

Straight from the docs: Explanation of the function Raises the error given in string and stops processing of job. If optional B1 is included with a value of true, this function stops the send ...
Javier García's user avatar
4 votes

How to pass subscriber info to SSJS in landing page

No need to do the AMPscript block first. The SSJS has the same context as the AMPscript block. You can just retrieve them directly with Attribute.GetValue(): <script runat="server"> ...
Adam Spriggs's user avatar
  • 30.7k
4 votes
Accepted

Update Data Extension after clicking on an email link

As I was saying on the Marketing Cloud group, an easy way to achieve this is to have landing page between your link and your destination page. The page is hosted on Cloudpages and can perform ...
Jeremy Garcia's user avatar
4 votes

Passing subject line to view_email_url landing page

There is no way for a user to change this title in a View as Web Page (VAWP) link as this is autogenerated by SFMC. You could talk to your account rep and see if there is anything they can do to ...
Gortonington's user avatar
  • 30.6k
4 votes
Accepted

In a SalesForce Marketing Cloud landing page is there a way to track if a page has been viewed before

There are several different approaches to this. You could query the Click Data View, but considering that data is only retained for 6 months, it could be safer to track clicks yourself, in a DE. The ...
Eliot Harper's user avatar
  • 16.6k
4 votes
Accepted

Limit Records in a data extension

For the data extension limit, you can wrap the whole page and logic inside an AMPscript block. This block would lookup to your DE and if count is greater then 300 then show the 'sorry maximum has been ...
Gortonington's user avatar
  • 30.6k
4 votes

SFMC Cloudpage Execution Context is always load

According to the Ampscript guide: In the current release of Marketing Cloud, the @@ExecCtx variable will always return load, irrespective of the context. This is a known issue and should be ...
Jeremy Garcia's user avatar
4 votes
Accepted

SFMC Cloudpage Execution Context is always load

You can use the solution where you set a hidden parameter in your form, e.g.: <input type="hidden" id="submitted" name="submitted" value="submitted"> Once submitted, you check for the ...
Lukas Lunow's user avatar
  • 21.6k
4 votes
Accepted

Data extension row retrieval

If you need just the total rowcount of your dataextension, you can utilize DataExtensionRowCount() In which case you just: set @neededNumber = DataExtensionRowCount('TableName') This is optimal as ...
Gortonington's user avatar
  • 30.6k
4 votes
Accepted

Unable to fetch the Job ID for a landing page

As @zuzannamj stated in comments. Your solution is to utilize the CloudPagesURL() function in AMPscript. Basically it would change your 'email code' to: Hi,<br> <br> %%[ SET @Sub = ...
Gortonington's user avatar
  • 30.6k
3 votes

Passing Publication List ID in custom Unsubscribe URL

The list ID is available as personalization string %%listid%%. You can just append this as parameter to your unsubscribe-link. More information on personalization strings can be found in the ...
Markus Dang - formerly Slabina's user avatar
3 votes

Trigger send after submit from Smart Capture in Cloud Pages?

Triggered sends do work with Cloud Pages/Smart Capture. A popular use case is "welcome" signup emails after form submit. However, the form needs to be built using the "classic" landing page form tools ...
Kat_43364's user avatar
3 votes
Accepted

Trigger or Schedule AMPscript to run when needed. (Update on Salesforce Record)

Marketing Cloud doesn't have AmpScript automation activity but you can make use of Server-Side JavaScript Activity to run timely manner in Automation studio. Also, if it not enable in your account ...
Palash Rai's user avatar
  • 1,824

Only top scored, non community-wiki answers of a minimum length are eligible