Code Samples

These examples demonstrate things you can develop in your Marketing Cloud account to accomplish specific tasks. Each example includes sample code that you can modify and use in your own account.

Real-Time AJAX Update for CloudPages

Real-Time AJAX Update for CloudPages

display form updates in real-time using AJAX

Inject a user into a Journey on form submission.

Inject a user into a Journey on form submission.

A method to inject a user into a journey on form submission, using a Smart Capture form along with the Journey Builder API.

Toggling Between Multiple ContentBlocks

Toggling Between Multiple ContentBlocks

Create buttons to display an array of ContentBlocks.

Collecting data on form submission

Collecting data on form submission

Collect subscriber data on form submission.

Create a Success Page on Form Submission

Create a Success Page on Form Submission

Keep the user on the same page after submitting a form using RequestParameter().

Find a Data Extension and it’s folder path using SSJS

Find a Data Extension and it’s folder path using SSJS

If you work with multiple Data Extensions in different folders, create a CloudPage app to help navigate.