[英]Track clicks on website as conversions
Below is the code of the button that marked in red 下面是标记为红色的按钮的代码
<div class="ccms_form_element cfdiv_submit" id="input_submit_51_container_div" style="text-align:left">
<input name="input_submit_5" class="" value="Send" type="submit" />
<div class="clear"></div>
<div id="error-message-input_submit_5"></div>
</div>
I just check the google support of "Track clicks on your website as conversions" but I don't know which code should I use and how to modify. 我只是检查了Google支持“将您的网站上的点击作为转化进行跟踪”,但是我不知道我应该使用哪个代码以及如何进行修改。
Google: Add the code to a text link: In the code below, replace “ http://example.com/your-link ” with the URL for your website or telephone link, and replace “Download now!” with your link text. Google:将代码添加到文本链接中:在下面的代码中,将“ http://example.com/your-link ”替换为您的网站或电话链接的URL,并将“立即下载!”替换为链接文本。
<a onclick="goog_report_conversion ('http://example.com/your-link')"
href="http://example.com/your-link">Download now!</a>
Or: 要么:
<a onclick="goog_report_conversion ('tel:800-123-4567')"
href="#">Call now!</a>
Add the code to a button: In the code below, replace “ http://example.com/your-link ” with the URL for your website or telephone link, and replace “Download now!” with your button text. 将代码添加到按钮:在下面的代码中,将“ http://example.com/your-link ”替换为您的网站或电话链接的URL,并将“立即下载!”替换为按钮文本。
<button onclick="goog_report_conversion('http://example.com/your-link')"
href="http://example.com/your-link">Download now!</button>
Or: 要么:
<button onclick="goog_report_conversion('tel:800-123-4567')">Call 800-123-4567</button>
Add the code to an image: In the code below, replace “download_button.gif” with your button image, replace the width and height with your button's parameters, and replace “ http://example.com/your-link ” with the URL for your link. 将代码添加到图像:在下面的代码中,将“ download_button.gif”替换为按钮图像,将宽度和高度替换为按钮的参数,并将“ http://example.com/your-link ”替换为链接的网址。
<img src="download_button.gif" alt="Download Whitepaper"
width="32" height="32"
onClick="goog_report_conversion
('http://example.com/your-link')"/>
Or: 要么:
<img src="my_phone_button.gif" alt="Call: 800-123-4567"
width="32" height="32"
onClick="goog_report_conversion('tel:800-123-4567')"/>
You can add "onclick" events to input fields like this as well ( https://www.w3schools.com/jsref/event_onclick.asp ) 您也可以像这样将“ onclick”事件添加到输入字段中( https://www.w3schools.com/jsref/event_onclick.asp )
<div class="ccms_form_element cfdiv_submit" id="input_submit_51_container_div" style="text-align:left"> <input name="input_submit_5" class="" value="Send" type="submit" onclick="console.log('track something');" /> <div class="clear"></div> <div id="error-message-input_submit_5"></div> </div>
So something like 所以像
<input name="input_submit_5" class="" value="Send" type="submit" onclick="goog_report_conversion ('http://example.com/your-link')" />
should work 应该管用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.