将 Google Analytics 与 Worldpay 结合使用
我正在尝试让 Google Analytics 电子商务跟踪与我们网站的支付网关 Worldpay 完美配合。我不想使用的解决方案已经发布(下面的链接),但涉及购物者的额外点击,这是我希望避免的。 http://www.tatvic.com/blog/google-analytics-worldpay -ecommerce-tracking
购物者被带到 Worldpay 的网站来处理卡,该网站没有可用的 JavaScript,并且 GA 电子商务跟踪失败。
让我引导您完成这些步骤:
- 购物者到达我们的网站,其中设置了 Google Analytics(分析)以成功跟踪他们的活动。
- 购物者点击“订单”,然后进入 Worldpay 网站进行信用卡处理。购物者在 Worldpay 网站上完成订单,他们的购物体验就结束了。
- Worldpay 将其“付款响应消息”发送给我们,该消息将发送到我们指定的页面“response.cfm”。此消息包含有关订单的各种详细信息(cartID、ammount 等),我们将其作为已完成的订单归档在数据库中。
我的问题是,请原谅我的无知,但是是否可以使用发送到我们的response.cfm页面的自动付款消息来将所有GA数据发送到google?如果我能帮助的话,我不想让用户参与/将他们重定向回我们。
Worldpay 允许我们将自己的变量发送给他们,然后在支付响应中返回变量。我希望我们可以使用这个功能来使其发挥作用?这将是与上面的链接类似的解决方案,但不需要购物者单击最后的按钮(并收到警告消息)
I'm trying to get Google Analytics eCommerce tracking to play nicely with our site's payment gateway, Worldpay. A solution, which I'd prefer NOT to use has been posted (link below), but involves extra clicks for the shopper, which I was hoping to avoid.
http://www.tatvic.com/blog/google-analytics-worldpay-ecommerce-tracking
The shopper is taken to Worldpay's website to process cards, where no javascript is available and the GA eCommerce tracking breaks down.
Let me walk you through the steps:
- A shopper arrives at our site where Google Analytics is set up to successfully track their movements.
- The shopper clicks "ORDER" and is taken to Worldpay's website for credit card processing. The shopper completes their order on Worldpay's site and their shopping experience is over.
- Worldpay POST us their 'payment response message' which is sent to our designated page 'response.cfm'. This message contains various details about the order (cartID, ammount, etc..) which we file in the database as a completed order.
My question is, and please excuse my ignorance, but is it possible to use this automated payment message, sent to our response.cfm page to send all the GA data to google ? I don't want to involve the user/redirect them back to us, if I can help it.
Worldpay allow us to send our own variables to them, then return the variables in the payment response. I was hoping we could use this feature to make it work? It would be a similar solution to the link above, but wouldn't need the shopper to click the button at the very end (and get a warning message)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这是一个老问题了,但由于没有人发布认为值得发布我对这个问题的解决方案。
构建一个响应脚本,该脚本纯粹用于处理响应,而不是显示消息,例如response.php。还创建一个显示消息的页面,例如complete.php
在response.php 中包括:
将“参数”替换为您想要传递给Analytics 的预订中的任何信息。在complete.php 中包含根据需要引用$_GET 参数的Analytics 代码。
为了额外的安全性,我建议传递一个带有秘密哈希的附加参数(每个交易都不同),并在上面的 if 语句中进行比较。
我希望这是一个有用的解决方案:)
I know this is an old question now but as no-one has posted thought it would be worth posting my solution to this problem.
Build a response script which is purely there to handle the response, not display the message, for example response.php. Also create a page which displays a message, for example complete.php
Inside response.php include:
Replace "parameters" with any information from the booking you'd like to pass to Analytics. Inside complete.php include your Analytics code referencing to $_GET parameters as required.
For extra security i'd recommend passing an additional parameter with a secret hash (different for every transaction) and compare that in the above if statement as well.
I hope this is a useful solution :)