On complete.tpl page in {if.paid} conditions I am trying to implement the following code but unable to add or track variables to it like {$amount} & {$clientsdetails.email} even adding {literal} tag is not working
{if $ispaid}
<!-- Enter any HTML code which should be displayed when a user has completed checkout here -->
<!-- Common uses of this include conversion and affiliate tracking scripts -->
<script>
fbq('track', 'Purchase', {currency: "INR", value: '{literal}{$amount}{/literal}'});
</script>
<script>
var enhanced_conversion_data = {
"email": '{literal}{$clientsdetails.email}{/literal}'
};
</script>
{literal}
<!-- Global site tag (gtag.js) - Google Ads: 90 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-0"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','AW-90', {'allow_enhanced_conversions':true});
</script>
{/literal}
<script>
gtag('event', 'conversion', {
'send_to': 'AW-90/tYVj####6##D',
'value': '{literal}{$amount}{/literal}',
'currency': 'INR',
});
</script>
{/if}