Expand my Community achievements bar.

SOLVED

Encrypt URL parameters

Avatar

Level 1

Hi,

 

I am looking to encrypt URL parameters for our Unsubscribe link using AES256 or similar.

 

Example:

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @LJane ,

 

You will have to follow two things in order to get query parameters encrypted for each profile, in such a way that it generates personalized preference center url when a user clicks. I see that you want to get email & country data for each of the profile to be encrypted.

 

1. First thing you will have to encrypt the email & country using the "encryption_aescbcEncrypt" function available by adding them as additional data on workflow query activity. Refer this page for list of functions: List of functions.

For example: encryption_aescbcEncrypt(@email, "\x4839dmjslekws482dks", "\xdfjskl30204dxms492")

 

2. Then create content block with the expression alias you see on the additional data.

    For email encryption could be something: <%= context.targetData.expr1 %> 

   Similarly you will have one for country encryption which is <%= context.targetData.expr2 %>

 

Final url will be like this: https://www.google.com?params=<%= context.targetData.expr1 %>&<%= context.targetData.expr2 %>  and whenever user clicks the preference center url it will have their email & country encrypted as query parameter.

 

Hope this helps.

 

Thanks!

SK

 

 

Thanks, Sathees

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @LJane ,

 

You will have to follow two things in order to get query parameters encrypted for each profile, in such a way that it generates personalized preference center url when a user clicks. I see that you want to get email & country data for each of the profile to be encrypted.

 

1. First thing you will have to encrypt the email & country using the "encryption_aescbcEncrypt" function available by adding them as additional data on workflow query activity. Refer this page for list of functions: List of functions.

For example: encryption_aescbcEncrypt(@email, "\x4839dmjslekws482dks", "\xdfjskl30204dxms492")

 

2. Then create content block with the expression alias you see on the additional data.

    For email encryption could be something: <%= context.targetData.expr1 %> 

   Similarly you will have one for country encryption which is <%= context.targetData.expr2 %>

 

Final url will be like this: https://www.google.com?params=<%= context.targetData.expr1 %>&<%= context.targetData.expr2 %>  and whenever user clicks the preference center url it will have their email & country encrypted as query parameter.

 

Hope this helps.

 

Thanks!

SK

 

 

Thanks, Sathees