Eldho Varghese
Eldho Varghese

Reputation: 25

Adobe DTM Data Element _satellite.getQueryParam()

I need to get query param value in Data Element custom JS, I found the following answers.

Adobe DTM Tool library not loaded

Adobe DTM to set query string in eVar and sProp

But the _satellite.getQueryParam() and _satellite.getQueryParamCaseInsensitive() are not safe to use (https://marketing.adobe.com/resources/help/en_US/dtm/object_reference.html), is there any alternative way in DTM to handle this?

Upvotes: 0

Views: 544

Answers (1)

Jenn
Jenn

Reputation: 410

Well, the "unsafe" functions (especially a common one like _satellite.getQueryParam()) are probably ok to use (I've seen them used without any issue for 4 years or so)- just be aware that you may need to change them when/if you upgrade to Adobe Launch.

But if you want something not on the _satellite object, the Adobe Analytics library has a built in function you can use- s.Util.getQueryParam (https://marketing.adobe.com/resources/help/en_US/sc/implement/util_getqueryparam.html). Note, if you are letting DTM manage your library, you'll only be able to use that s.Util.getQueryParam in code blocks associated with Adobe Analytics (because of scope issues)- so it wouldn't work in the third party tag code block.

Upvotes: 3

Related Questions