-2

Hi and thanks for your time. I have an landing page selling a product (Wordpress Course, for example). When someone clicks on the buy button, he´s redirected to a payment service (paypal like).

What i need from you is a simple thing: an idea (or even a clue) on how to count the number of times the submit button (buy button) is clicked.

I can easily imagine how to count page views with PHP, but is it possible to redirect him to the third party and at the same time reload the initial landing page, to execute my SQL Update Query to count one click, or something like this?

4

2 回答 2

1

你可以使用 Ajax。单击按钮时,就像其他人建议的那样,向 php 页面发送 AJAX 请求。但是,由于它是异步的,您的用户甚至不会注意到它。

就代码而言,您可以发送 ajax 请求,然后重定向到付款页面。轻松完成。

编辑 - -

要获取有关 ajax 的信息:http: //api.jquery.com/jQuery.ajax/

http://www.w3schools.com/ajax/

于 2013-10-17T21:48:26.117 回答
1

让链接转到您端的页面,即click.php执行 SQL 更新的页面,然后重定向到您希望它们结束的实际 URL。

或者,只需创建一个 bit.ly(或任何其他 URL 缩短器)URL 并免费使用其内置的点击跟踪。

于 2013-10-17T21:41:18.220 回答