- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Add "Onclick" tracking code on buttons
Hey guys,
I'm using a conversion code from Google Ads,which asked me to add codes like below to track my conversions:
Contents -
<a onclick="return gtag_report_conversion('http://example.com/your-link');" href="http://example.com/your-link">立即下載!</a>
Buttons -
<button onclick="return gtag_report_conversion('http://example.com/your-link')">提交</button>
Images -
<img src="download_button.gif" alt="下載白皮書" width="32" height="32" onclick="return gtag_report_conversion('http://example.com/your-link')" />
Since the code for button isn't standard Weebly button,I use html below to add a custom button on my website-which looks EXACTLY like Weebly standard button:
<a class="wsite-button wsite-button-small wsite-button-normal" href="https://line.me/R/ti/p/%40xxt6488p" target="_blank">
<span class="wsite-button-inner">點選立即與線上客服諮詢</span>
<onclick="return gtag_report_conversion(‘https://line.me/R/ti/p/%40xxt6488p')">
</a>
I want to track Who saw our ad,come to our website,and CLICK ON specific buttons,so we can now how good the convertion is,in oreder to improve our ads,but it didn't work well
One of our cooperated advertise studio claims that Weebly can't add "Onclick" feature on button,also my Google Ads can't recieve any data from it,support team of Google Ads said they got nothing to do with it,I should come and ask people on Weebly instead,so here I am
This means a lot to our business and advertisement,so I really hope there are people can help us out
Thanks for reading,have a nice day
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Thanks for sharing, @Mitch_mooh. I don't see any reason why this wouldn't work to track clicks for the button.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
how to add "onclick" onto the current button? what if you are a free user.
I also have the same questions, there are no input fields via the user interface of the online front-end editor.
If we upgrade into premium users, can we just edit the code of whole pages?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
I found the answer!
Just simply use <embed code> element under build mode.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Thanks for updating with your solution, @DDT!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report