Hey guys
For Google Ads campaigns I currently have the following in whmcs complete.tpl file.
It seems to dynamically track purchases and the amounts that is purchased. However I realise the currency section is not dynamically changing. Anyway to do that.
So if someone pays in USD it changes to USD and if someone pays in ZAR and shows in ZAR. Dont want to send incorrect data to Google Ads which I think it has been doing for awhile now as we overlooked this completely.
<script>
gtag('event', 'conversion', {
'send_to': 'AW-xxx/xxx',
'value': {$amount},
'currency': 'ZAR',
'transaction_id': ''
});
</script>
I've added this to templates/orderforms/lagom/complete.tpl
During the Google Ads conversion setup, they asked for a default conversion value which I set to ZAR48.
How do I dynamically set the value assigned for currency aswell to the Google Ads conversion based on the order that has just been made on the order-complete page?
Thanks