Creating field merges with query strings

Query string field merges are available for pre-populating only form fields, including hidden fields. For security reasons, they are not available for use on landing pages, in emails, or on form fields that have the Redirect to Web page form processing step enabled.

When entering the query string key, follow these guidelines:

  • The key must match how it appears in the hosting landing page's URL. URLs often undergo encoding and other format changes so they resolve properly within a browser. For example, they cannot accept spaces, so spaces will, in most cases, be changed to %20. As a result, your query string key may also undergo a transformation. It is important to understand how your key might change so your landing page URL will match. Refer to Query string validation if you are unsure if or how encoding will affect your query string key.
  • The following are not supported:
    • Unicode
    • Leading and trailing spaces
    • Older encoding schemes, such as %u

View an example of a query string field merge.

To create a field merge using a query string:

  1. Navigate to Assets > Components, then click Field Merge.

  2. Click New in the upper-right corner of the screen to open the Field Merge editor.

    An image of the Field Merge editor.

  3. Enter the name of the field merge in the Name field. You will use this name to identify the field merge in lists.
  4. Enter a default value to be displayed if the key doesn't resolve to a value.
  5. On the Merge From drop-down list, select Query String.

  6. Enter the query string key, bearing in mind that it must match the format in the landing page URL.

    Example: If you enter myKey as the query string key, the landing page URL should be http://example.com?myKey=myValue.

    If you want the value output to be URL encoded, add encodeFor=url to the field merge, inside the <span>. For example: <span class=eloquaemail encodeFor=url>_469_numeric1</span>. In this case all spaces are URL encoded to %20. If the encodeFor string is not present, all spaces are HTML encoded, so ' ' (space) remains ' ' (space).

  7. Click Save. If the button is disabled, you have entered an invalid query string key.

The field merge is now available for pre-populating only form fields.

Query string validation

The following table describes how key values are resolved by Oracle Eloqua. Use this table to ensure the key you supply matches the key in the landing page URL.

Note: If you want the value output to be URL encoded, add encodeFor=url to the field merge, inside the <span>. For example: <span class=eloquaemail encodeFor=url>_469_numeric1</span>. In this case all spaces are URL encoded to %20. If the encodeFor string is not present, all spaces are HTML encoded, so ' ' (space) remains ' ' (space).

Key value Landing page URL Merge tag Resolves to
myParam http://...?myParam=my:value <span class=eloquaemail>
MyField</span>
my:value
myParam http://...?myParam=my%3Avalue <span class=eloquaemail>
MyField</span>
my:value
myParam http://...?myParam=my%2Bvalue <span class=eloquaemail>
MyField</span>

my+value

myParam http://...?myParam=my+value <span class=eloquaemail>
MyField</span>
my value
myParam http://...?myParam&anotherParam=val <span class=eloquaemail>
MyField</span>
<No value - key does not exist - use default>
myParam http://...?myParam=&anotherParam=val <span class=eloquaemail>
MyField</span>
Empty value - use default
my+Param http://...?my%2BParam=myvalue <span class=eloquaemail>
MyField</span>
myvalue
my+Param http://...?my+Param=myvalue <span class=eloquaemail>MyField
</span>
No value - key does not exist - use default
my:Param http://...?my:Param=myvalue <span class=eloquaemail>MyField
</span>
myvalue
my key http://...?my%20key=my%20value <span class=eloquaemail>MyField
</span>
my value
my key http://...?my%20key=my%20value <span class=eloquaemail encodeFor=url>MyField</span> my%20value
my key http://...?my+key=my%20value <span class=eloquaemail encodeFor=url>MyField</span> my%20value
myParam http://...?myParam=gar%C3%A7on <span class=eloquaemail encodeFor=url>MyField</span> gar%C3%A7on
garçon http://...?gar%C3%A7on=my%20value <span class=eloquaemail>MyField
</span>
my value (Unicode is not supported.)
myParam http://...?myParam=gar%C3%A7on <span class=eloquaemail>MyField
</span>
garçon
evilScript http://...?evilScript=%3Cscript%3EDoEvilStuff()%3C%2Fscript%3E <span class=eloquaemail>MyField
</span>
&lt;script&gt;DoEvilStuff()&lt;/script&gt;
multiKey http://...?multiKey=first&b=2&multiKey=last <span class=eloquaemail>MyField
</span>
first
myParam http://...?myParam=Deloitte%20%26%20Touche <span class=eloquaemail>MyField
</span>
Deloitte & Touche
Deloitte & Touche http://...?Deloitte%20%26%20Touche=myValue <span class=eloquaemail>MyField
</span>
myValue
my&Param http://...?my%26Param=hello <span class=eloquaemail>MyField
</span>
hello
myKey Leading space not supported
myKey (trailing space) Trailing space not supported

Learn more

Field merge examples

Field merges

Component Library

Emails