Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
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 ...
user avatar
  • 16.9k
10 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("...
user avatar
9 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=",...
user avatar
  • 27.9k
7 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....
user avatar
  • 27.9k
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....
user avatar
  • 27.9k
6 votes

how to query for contact of a customer portal user or community user

There is no User.Contact field, instead you have to user User.ContactId userId = System.currentPagereference().getParameters().get('uId'); User u = [SELECT u.Id,u.ContactId,u.IsActive FROM ...
user avatar
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 ...
user avatar
  • 27.9k
6 votes
Accepted

Using AMPscript on Landing Pages

You need to print the variable using %%=v(@id)=%% And not %%[=v(@id)=]%%
user avatar
  • 1,036
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 ...
user avatar
  • 27.9k
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 ...
user avatar
  • 116
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 ...
user avatar
  • 15.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,...
user avatar
  • 15.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 ...
user avatar
  • 3,052
5 votes
Accepted

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

You can't track outbound links from Cloud Pages, as they are not being redirected through the tracker domain, unlike links from emails. If you want, you can create a custom solution, where you will ...
user avatar
  • 16.9k
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....
user avatar
4 votes
Accepted

How do I add subscriber to a suppression list with ampscript in a landing page?

It seems like using publication lists is better for this purpose. I used the following code to achieve my goal: SET @rr = CreateObject("RetrieveRequest") SetObjectProperty(@rr, "ObjectType", "List"...
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"> ...
user avatar
  • 7,706
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 ...
user avatar
  • 3,052
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 ...
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"> ...
user avatar
  • 27.9k
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 ...
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 ...
user avatar
  • 27.9k
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 ...
user avatar
  • 15.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 ...
user avatar
  • 27.9k
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 ...
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 ...
user avatar
  • 16.9k
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 ...
user avatar
  • 27.9k
3 votes

Web Analytics Connector breaking custom unsubscribe page when clicked within email

Here's a workaround for this bug with the CloudPagesURL() function. It plays nicely with the Web-Analytics Connector. I forced an extra ? in the URL in the last set @url0 line. %%[ var @pageID, @...
user avatar
  • 27.9k
3 votes

Capturing ExactTarget landing page in Salesforce

This is what SmartCapture is for. Quoting the official documentation Smart Capture is a tool you can use to create lead capture forms to include in your landing pages. When a lead completes the ...
user avatar
3 votes

How to retrieve Subscriber Profile Attributes using RetrieveRequest using AMPscript (Landing Page)

I'm not sure why but adding the ID Property when retrieving the Subscriber object will return the custom Profile Attributes. Add this to your request: AddObjectArrayItem(@rr,"Properties","ID") ...
user avatar
  • 1,958

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