Digioh Universal Merge Tags

Digioh App Marketplace

By default, Digioh supports merge tags for form fields and “analytics” values for use in integration templates. For a complete list, see What are all the data and analytics fields Digioh can push through Integrations?

With the help of App #61 – Universal Merge Tags, you can also use most of these merge tags anywhere inside a box. This means text elements, button text, html elements, redirect URLs, form field labels, and form field default values.

If you just want to pass UTM or other URL parameters with your box submissions this is the app for you, but you can look at our simple step-by-step guide to tracking UTMs instead.

To install and activate, click on the profile menu top right, select Custom JS (Apps), install App #61, and then Publish.

The simplest merge example is to recall prior form input, in this case the standard [NAME] field:

The Thank you page recalls the name form field from the prior page:

You can use of the standard field merge tags [EMAIL], [NAME], [FIRST_NAME], [LAST_NAME], [PHONE], [OPT_IN], as well as [CUSTOM_1] … [CUSTOM_50].

Here’s a more complex example that includes:

  • Merge tags in header
  • Merge tags in form field Label
  • Merge tags as text input defaults, which is useful for prepopulating forms
  • Merge tag used to construct a redirect URL

Available merge tags in addition to this list of merge tags are:

  • [HOST_NAME] – the hostname part of URL (site domain)
  • [PAGE_PATH] – the path portion of the URL e.g. /some/path.html
  • [IP_ADDRESS] – IP address of the client e.g.
  • [UTC] – Milliseconds since 1970; the UTC timestamp e.g. 1651169900419
  • [UTCDAY] – Milliseconds since 1970 to midnight today; the UTC timestamp rounded by day e.g. 1651104000000
  • [GA_CLIENT_ID] – The Google Analytics (Universal) clientId

Tips and Tricks

  • Merge tags can be useful as default values for hidden fields that you want to submit.
  • You can use any number of merge fields in a single element.
  • For redirects, you can grab utms or other query string parameters and include on the redirect URL.
  • Merge tags cannot be nested.
  • While you can use merge tags for text input and hidden fields, they don’t work in dropdowns, radios, or checkboxes.

This app also supports several advanced merge tags that allow you to merge the values of cookies, localStorage, and query string parameters:

Query String and Browser Storage Access

  • [QS|queryStringKey] – replace with a value from query string on this page; [QS|utm_source] will replace as facebook for URL with ?utm_source=facebook
  • [QSLC|queryStringKey] – replace with stored “last click” value from query string; useful for attribution parameters like utm_source.
  • [QSFC|queryStringKey] – replace with stored “first click” value from query string; useful for attribution parameters like utm_source.
  • [QSSN|queryStringKey] – replace with stored value from query string for this browser session; equal to last click unless session has expired.
  • [COOKIE|cookieName] – replace with the contents of a named cookie e.g. [COOKIE|is_logged_in]
  • [LS|localStorageName] – replace with the contents of a named localStorage item e.g. [COOKIE|user_id]

These merge tags will default to an empty string if the key is not found, but also supports the setting of your own default values, e.g. [COOKIE|last_login|unknown].

Questions? Comments? Let us know at contact@digioh.com