Hi there,

I have a javascript widget which displays a button and QR code when you 
hover it. And if you click on it it will link to Whatsapp/Line app on 
mobile.

I have a problem adding gtag_report_conversion(); in the code to track how 
many times the customers actually clicked on it.

When I add this code under S.onload, it overcount because everytime there 
is a mouse hover, it counts a conversion. (code as below)

*s.onload = function () { WhWidgetSendButton.init(host, proto, 
options); gtag_report_conversion();};*

However when I put this under s.onclick event, there is no conversion at 
all.


*s.onload = function () { WhWidgetSendButton.init(host, proto, options); 
};s.onclick = function () { gtag_report_conversion();};*


May I ask for help how to deal with this so I can track the conversions 
(how many times customers "click" the botton)







*<sript type="text/javascript"> (function () { var options = { line: 
"//line.me/R/ti/p/8888", // Line QR code URL call_to_action: "Customer 
Service Online", // Call to action position: "right", // Position may be 
'right' or 'left' };*







* var proto = document.location.protocol, host = "getbutton.io", url = 
proto + "//static." + host; var s = document.createElement('script'); 
s.type = 'text/javascript'; s.async = true; s.src = url + 
'/widget-send-button/js/init.js'; s.onload = function () { 
WhWidgetSendButton.init(host, proto, options); }; s.onclick = function () { 
gtag_report_conversion();}; var x = 
document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, 
x); })(); </script>*

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/49cfbdb7-7715-4b6b-b31f-95a31de04b50n%40googlegroups.com.

Reply via email to