Google Ads Conversion Tracking Not Working via Adobe Launch Click Rule
Hi All,
I’ve successfully implemented the Google Ads global site tag (gtag.js) on all relevant pages using Adobe Launch. I verified that gtag.js is loading correctly, and I can see console logs confirming it's working on page load.
Now, I’m trying to track a Google Ads conversion when a user clicks a specific button. I created a rule in Adobe Launch with the following setup:
Event: Core - Click - with the correct CSS selector
Action: Core - Custom Code (JavaScript)
Here’s the code I used in the action:
function gtag_report_conversion() {
var callback = function () {
if (typeof(url) != 'undefined') {
url = window.location;
}
};
gtag('event', 'conversion', {
'send_to': 'AW-00000000000/XXXXXXXXXXX',
'value': 1.0,
'currency': 'EUR',
'event_callback': callback
});
}
gtag_report_conversion();
Problem:
The rule is firing (confirmed via Adobe Launch debugger)
But the console statements are not appearing
No conversion hits are seen in Omnibug or DevTools > Network
It seems like the custom code is not executing even though the rule is triggered
Can someone help identify what might be going wrong? Is there an issue with how the custom code is written or executed within the Launch rule?
Thanks in advance for your guidance!