_satellite.getQueryParam

In DTM this function takes one argument, the URL query string key and it will return that key's value.

For example, if DTM is loaded on a page with the URL,

https://www.example.com/?foo=cat&bar=dog,

_satellite.getQueryParam("foo") would return "cat"

_satellite.getQueryParam("bar") would return "dog"

Remedies :

1) Create data elements in the Launch UI using the Core > Query String Parameter data element type. You can reference these data elements anywhere in the Launch UI, but you can also reference them in custom code bay calling _satellite.getVar("<data element name>");

To replicate the functionality of _satellite.getQueryParamCaseInsensitive, select the checkbox labeled, "Allow capitalization differences (case-insensitive)"

2) If you need to access the query string from within custom code and you can't create data elements for the keys, you can include the SDI Toolkit Extension in your project and enable the queryString utility functions. Once you've done so, window._sdiToolkit.reactor.queryString will be exposed and can be referenced within your custom code at runtime. Docs for these functions can be found here.

Last updated