To track a "link clink" in Google Ads, I need to add code directly to the buttons on my site. I'm not seeing a way to do this through the button properties. Am I correct, or did I overlook something?
If I can't add code through the button properties, I believe I would have to modify the HTML itself. I'm not 100% sure how to do this and am hoping someone with more advanced knowledge might guide me.
This is how the code is:
<div id="wb_estimateBtn1">
<a class="ui-button ui-widget ui-corner-all" id="estimateBtn1" href="https://www.link.com" target="_blank">Request an Estimate</a></div>
This is what I need to add:
<button onclick="return gtag_report_conversion('http://example.com/your-link')">Submit</button>
Any thoughts would be great!
Adding code to a button
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/links.html
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/links.html
Re: Adding code to a button
You can add this via the 'Events' properties (onclick).
-
-
- Posts: 209
- Joined: Mon Aug 20, 2018 6:47 pm
Re: Adding code to a button
Thanks for the very quick reply!
I'm honestly not sure what "action" I need to select for this to work right.
After I know the action, would I also need to add all of this?
<button onclick="return gtag_report_conversion('http://example.com/your-link')">Submit</button>
Sorry, just very confused
I'm honestly not sure what "action" I need to select for this to work right.
After I know the action, would I also need to add all of this?
<button onclick="return gtag_report_conversion('http://example.com/your-link')">Submit</button>
Sorry, just very confused
Re: Adding code to a button
You need to select the action 'run javasacript' and copy/paste the code.
Code: Select all
return gtag_report_conversion('http://example.com/your-link');
-
-
- Posts: 209
- Joined: Mon Aug 20, 2018 6:47 pm
Re: Adding code to a button
Thank you so much for this level of help! I really appreciate it!