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
  • 3008 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 25, 2023

Hi @krishnakanth_patnaik_cc,

But is the encoded URL giving any error on the webapp loading? This is the default behavior of Adobe Campaign. The cryptString method will result in the value being url encoded if used in a url.

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