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
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Hi @isahore ,
No it is not giving any error, it loads the page without any issue. But when I fill the form it creates a new record even when I'm preloading it and using cryptString to encrypt the id.
I even tried to use Encrypted Identifier field in Recipient table. But same result.
I tried JavaScript unescape() method to make the characters load properly but no change.
All this is working find if I'm disabling the tracking for this URL.
Views
Replies
Total Likes
Then you need to handle that in the web app. If you are passing a field other than the recipient Id, then the OOTB preloading in the web app would not work.
Views
Replies
Total Likes
If you want to load additional data, then you need to check the below checkbox and pull those data to let them flow in the WebApps.
Regards
A
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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!
Views
Replies
Total Likes
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
Great! Thanks for sharing with the Community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies