0

Not sure this is possible with Marketing Cloud Smart Capture form and landing pages, but seems like it should be.

I'm working with a client who has more than 50 locations. Their website(s) is a WordPress multi-site installation, with a site for each location.

Client wants to use a Smart Capture form on a landing page. Rather than create a landing page/form for each location, I'd like to pass the location name in the URL from the link on the WordPress location site to a single MC landing page.

Assuming I name the field in my data extension "Location", how would I build the URLs and how would I populate either the form field or the data extension record that's created from the form submit?

2

This is briefly explained in the Smart Capture documentation. In short, you will need to:

  1. Pass the location name as a URL parameter to the landing page, for example, http://pages.example.com?location=sydney
  2. Create a hidden form field in your Smart Capture form named 'location'
  3. Use the AMPscript RequestParameter() function to retrieve the value of the URL parameter.

Here is some sample code:

%%[
var @location
set @location = RequestParameter("location")
]%%

<!-- include in your form -->
  <input name="location" type="hidden" value="%%=v(@location)=%%" />

You will then create/update the 'location' Data Extension field with this hidden form field value.

  • We are having the issue that the Content Builder somehow adds spaces between value="%%=v(@location)=%%." It then looks like this in the HTML editor: value=" %%=v(@location)=%%" Is anyone else experiencing this issue and know how to solve that? – Stephan de Paly Dec 20 '16 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.