# JSON to base64 for email templates for pixel tracking

**URL:** <https://community.auth0.com/t/json-to-base64-for-email-templates-for-pixel-tracking/72751>\
**Category:** Get Help\
**Created:** [November 8, 2021, 11:19am UTC](https://community.auth0.com/t/json-to-base64-for-email-templates-for-pixel-tracking/72751 "2021-11-08T11:19:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcherevko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pcherevko/32/32833_2.png) [@pcherevko](https://community.auth0.com/u/pcherevko)\
**Post date:** [November 8, 2021, 11:19am UTC](https://community.auth0.com/t/json-to-base64-for-email-templates-for-pixel-tracking/72751/1 "2021-11-08T11:19:04Z")

</div>

Hi, all!  
Is some one has experience with converting data from json to base64 in auth0 rules, hooks or maybe in the email templates by liquid syntax?  
Maybe some one could advise the better way (where and how) convert data to base64 and provide converted to email templates as user\_metadata ?  
Need it to implement tracking pixel api

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 15, 2021, 10:15pm UTC](https://community.auth0.com/t/json-to-base64-for-email-templates-for-pixel-tracking/72751/3 "2021-11-15T22:15:02Z")

</div>

Hi @pcherevko,

Welcome to the Auth0 Community!

It looks like we are working through a similar question here:

> [@Email template Base64 encode in liquid syntax](https://community.auth0.com/t/email-template-base64-encode-in-liquid-syntax/72745):
>
> Hi, [Base64 Decode & Encode Filters by dinsley · Pull Request #1450 · Shopify/liquid · GitHub](https://github.com/Shopify/liquid/pull/1450/files) shows that the liquid syntax now support {{ 'some data' | base64\_encode }} But it does not work in auth0 email templates. Do you know what version is used by Auth0? Some background on this requirement: We want to add segment pixel tracking in our emails. [Tracking Pixel API | Segment Documentation](https://segment.com/docs/connections/sources/catalog/libraries/server/pixel-tracking-api/) . For that we need to send a base64 of some user metadata. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 30, 2021, 10:15pm UTC](https://community.auth0.com/t/json-to-base64-for-email-templates-for-pixel-tracking/72751/4 "2021-11-30T22:15:21Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
