Skip to main content
Solved

Want to add a link on the page with some query parameter encoded with UTF-8 to base64

  • July 22, 2022
  • 3 replies
  • 661 views

Forum|alt.badge.img+2

Hi,

I am trying to create a link on the email template which should have a query parameter and its value is concatenated value of properties with encoded in utf-8 to base64. 

 

eg. www.mydomain.com/service/parameter={{property1+”seperator”+property2…..|urlencoded}}

 

Any suggestion ??

 

Thanks

Best answer by stephen.trumble

Hey @rpandey 

Welcome to the Klaviyo Community! Thank you very much for coming to the community for help with creating a link in your email template.

I do have a question to start, what are you trying to do with the value you are creating? You can encode to base64 format using this site: https://www.base64encode.org/ , but I am curious what the use case for this might be? I love to learn about users strategies!

Thank you for being part of the Klaviyo Community!

3 replies

stephen.trumble
Forum|alt.badge.img+60
  • Klaviyo Alum
  • 1515 replies
  • Answer
  • July 22, 2022

Hey @rpandey 

Welcome to the Klaviyo Community! Thank you very much for coming to the community for help with creating a link in your email template.

I do have a question to start, what are you trying to do with the value you are creating? You can encode to base64 format using this site: https://www.base64encode.org/ , but I am curious what the use case for this might be? I love to learn about users strategies!

Thank you for being part of the Klaviyo Community!


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 1 reply
  • July 25, 2022

Hi @stephen.trumble ,

 

My Use-case is to sent a mail to customer, on which we will have a URL, this url is generated from the Klaviyo, while constructing the email, customer data will be picked and appended as a query parameter, but before appending, all customer information will be concatenated and encoded using {{urlencode}} and {{base64_encode}}. actually I am able to achieve the most part. but facing problem while trying to achieve below -

we have some customerdata i.e. useremail and country we need to append it with its key name.

eg. email=useremail+country=countryName refer this as encodedString, in this I am not able to concatenate variables, also not able to prepend a string (i.e. email=). so that I can encode whole string.

now encode this string with base64 and urlencode and paas the encoded string to below url as a value of query parameter 

eg . www.mydomain.com/myservice/params=encodedString


saleignition-com
Contributor I
Forum|alt.badge.img+3

Did you ever find a solution to this? I have built this to enable Recharge Quick Actions in Klaviyo Flows to handle subscription actions. If you need some help reach out.