At the moment, we have a typology rules (type: control) which rewrites all the URL's and adds some url parameters to it. This is done in javascript
As an improvement, we wish to add a hashed customer number as a url parameter to the URL.
Therefor I need to access the recipient.cryptedAccountId but I don't know how to acces a recipient in my javascript of a typology control rule.
Can someone provide a solution on how to add the cryptedAccountId to each URL?
Hi,
Try the documented jsapi cryptString() function on account id, add cryptedAccountId to all your personalization, or batch select cryptedAccountId's in the script (expensive).
NB there are several undocumented encryption functions so cryptString() may not match the computed col's xtk AESEncrypt() call.
Another avenue is to alter tracking calculation click formula instead of writing a control typology here, if possible for your use case.
Thanks,
-Jon
Hi Jon,
Thank you very much for this insight.
Kind regards,
Ayat
Hi Ayats,
In addition of what Jon wodnicki mentions, you must also escape the result for URL compliance.
if you are in ISO8859P* charset (Latin1, etc) please use the Adobe Campaign API Javascript escapeUrl(cryptString(recipient.@id)) or escapeUrl(recipient.@cryptedId)).
http://docs.campaign.adobe.com/doc/AC/en/jsapi/f-escapeUrl.html?hl=escapeurl
If you are in utf8 environment, you must use encodeURIComponent() standard Javascript function to escape special characters.
As said by Jon, using Javascript memory intensive calculations is not ideal at all at the step of delivering, please take care and think about other solution.
Regards.
J-Serge
Oh I meant selecting the data in the control typology is expensive, since it's n / batch-size lookups added per delivery.
That was meant to be written as 3 options in descending order of overhead.
Hi Jean-Serge,
Great insight, thank you.
Kind regards,
Ayat
Hi,
We manages to add the Recipient Id field using the formula of the Web analytics External Account. It's not a typology rule, but it works well to add any recipient field on any url.
Formula:
Demo, we land on this URL when we click on a link in the email:
Regards
Florian
Right, that's tracking calculation click formula plus extra analytics params.
Hello Florian,
Thank you for your reply.
I will propose this solution as well as the previous one (JSAPI) to our team.
Good job.
Kind regards,
Ayat
Views
Like
Replies
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies