来自用户未访问过的页面的 Google Analytics(分析)
我有谷歌分析设置,用于在用户从支付网关(在本例中为 paypal 或 barclaycard epdq)返回时跟踪电子商务交易。当用户返回我的网站并访问“谢谢”页面时,谷歌分析代码会被触发,但当客户支付订单费用,然后没有返回“谢谢”页面时,分析代码不会得到触发。触发,因此交易不会显示在谷歌分析中,从而导致数据不完整。
我需要一种方法来触发 javascript 中的电子商务分析代码,即使用户没有访问该页面。 因此,当我从 paypal 收到服务器端响应,表明付款已完成时,我可以以某种方式触发此处的分析代码,以防用户不返回感谢页面。
感谢您的帮助
I have google analytics setup for tracking e-commerce transactions when a user returns back from the payment gateway (In this case paypal or barclaycard epdq). This works well when a user comes back to my website and visits a 'thankyou' page the google analytics code gets triggered but when the customer pays for their order and then doesn't come back to the thankyou page the analytics code doesn't get triggered and therefore the transaction doesn't show up in google analytics therefore rendering the data incomplete.
I need a way to trigger the e-commerce analytics code which is in javascript even if the user doesn't visit the page.
So when I get the server side response from paypal that the payment has been made I can then somehow trigger the analytics code here incase the user doesn't return to the thankyou page.
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种替代解决方案如下:
这不是完美的解决方案,但它作品。
One alternative solution is the following:
It's not the perfect solution but it works.
您可以设置 Paypal (IPN),以便在客户完成交易后回拨到您的站点。
这是两个 Paypal 链接:
https://www.paypal.com/ipn
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_html_ paymentdatatransfer
You can setup Paypal (IPN) to call back to your site when a customer has completed a transection.
Here is the two Paypal link:
https://www.paypal.com/ipn
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_html_paymentdatatransfer