WebApp URL is getting Encoded | Community
Skip to main content
Level 3
May 25, 2023
Solved

WebApp URL is getting Encoded

  • May 25, 2023
  • 3 replies
  • 3009 views

Hi,

We are trying to preload a webapp using a custom schema.

If we copy the URL along with query params and hit it directly in browser, it loads the data properly.

But when we trigger the same via campaign (Email/SMS), the URL params are getting encoded.

Note: It has something to do with URL tracking

When we excluded the URL from tracking in email, it loaded the URL properly.

 

Is there a way to load URL decoded without excluding it from tracking?

 

Coded url path in delivery - /webApp/samplewebapp?id=<%= cryptString(targetData.lid) %>

 

Expected url path - webApp/samplewebapp?id=@XKNvG9IU25DlmroyzVivrg==

 

Actual url path - webApp/samplewebapp?id=%40XKNvG9IU25DlmroyzVivrg%3D%3D

 

 

 

Please help me with this.

 

Thanks,

Krishna

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by krishnakanth_patnaik_cc

We ended up setting up a redirect webapp, passing the webapp name and crypt string as params.

Eg:

 

https://youwebappdomain/redirect?page=webappname&id=cryptString(id)

 

The above will hit the redirect URL,

In redirect, we are using

location.href or window.location.href = https://youwebappdomain/webappname?id=id

this will redirect to proper webapp without encoding the characters.

 

Note: You might have to use "unescape(id)" in redirect webapp just in case.

https://youwebappdomain/webappname?id=unescape(id)

 

Thanks,

Krishna

3 replies

isahore
Community Advisor
Community Advisor
May 25, 2023

Hi @krishnakanth_patnaik_cc,

As such, keeping tracking enabled and not having a tracked URL behind a link is not possible.

 

But the example you provided above looks like only the id parameter in the URL is changed, and it is being (Url)escaped, not encoded. Check your email/sms link in the delivery template, there might be the escapeUrl being called, you can remove that and use the plain id parameter.

 

Let me know if that helped.

 

Thanks,

Ishan

Level 3
May 25, 2023

Hi @isahore ,

Thank you for quick reply. We are not using escapeUrl(). The sysntax looks like this.

 

/webApp/samplewebapp?id=<%= cryptString(targetData.lid) %>

 

Will update the question with this details as well.

 

Thanks,

Krishna

isahore
Community Advisor
Community Advisor
May 26, 2023

Hi @krishnakanth_patnaik_cc 

 

You can compare the link that is being generated by default through adobe campaign after clicking on the link in email and generate it through custom javascript. 

Script to generate similar URL of the WebApp

the above code uses the same functions and sequence to generate the URL that is done through WebApp.

 

Hope this helps to find the difference between both the URLs.

 

Regards

A


Hi @krishnakanth_patnaik_cc,

By default, the preloading in webapp takes recipient Id, that can also be seen on the webapp dashboard

 

If you want to use preloading with another schema (other than nms:recipient), then you can do so by changing the document type of the webapp under Properties > General > Storage, shown here:

Let me know if that works.

 

Thanks,

Ishan

Sukrity_Wadhwa
Community Manager
Community Manager
June 7, 2023

Hi @krishnakanth_patnaik_cc,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!

Sukrity Wadhwa
krishnakanth_patnaik_ccAuthorAccepted solution
Level 3
June 7, 2023

We ended up setting up a redirect webapp, passing the webapp name and crypt string as params.

Eg:

 

https://youwebappdomain/redirect?page=webappname&id=cryptString(id)

 

The above will hit the redirect URL,

In redirect, we are using

location.href or window.location.href = https://youwebappdomain/webappname?id=id

this will redirect to proper webapp without encoding the characters.

 

Note: You might have to use "unescape(id)" in redirect webapp just in case.

https://youwebappdomain/webappname?id=unescape(id)

 

Thanks,

Krishna

Sukrity_Wadhwa
Community Manager
Community Manager
June 7, 2023

Great! Thanks for sharing with the Community. 🙂

Sukrity Wadhwa