如何将简单的未签名 Google Checkout 购物车与 Google Analytics 集成?

发布于 2024-10-07 17:32:45 字数 268 浏览 0 评论 0原文

如何在 Google Checkout 中获取简单的未签名购物车,以便与 Google Analytics 集成以进行电子商务跟踪?

这方面的顶级 Google 结果都指向涉及签名购物车或服务器到服务器 API 请求的实现文档。

要求自我回答)

How can I get a simple unsigned cart in Google Checkout to integrate with Google Analytics for ecommerce tracking?

The top Google Results for this all point to documentation for implementations that involve signed carts or server-to server API requests.

(asking to self-answer)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彩虹直至黑白 2024-10-14 17:32:45

有关如何执行此操作的文档非常难找到,因此我发帖和自我回答的动机。

为 Google Analytics(分析)电子商务跟踪启用对未签名 Google 结帐购物车的分析支持:

此方法适用于任何不使用“签名”购物车或服务器到服务器 API 调用的购物车。基本上,这是设置 Google Checkout 的“最简单”方法。如果签名的购物车和服务器到服务器的 API 调用对任何人都没有任何意义,那么可能就是这样。

首先,您必须确保标准 Google Analytics 代码段不包含在带有购物车的页面上。

其次,您必须将属性值附加到网站上已有的 cart.js 标记中,如 help="UA-XXXXXX-X",其中 UA-XXXXX-X 是网站的帐户代码。

这是示例:

<script id="googlecart-script" type="text/javascript"
src="http://checkout.google.com/seller/gsc/v2/cart.js?mid=MERCHANT_ID"
aid="UA-XXXXXX-X"
currency="USD">
</script>

这就是您需要做的全部。这非常容易做到,但几乎不可能找到这个文档,因此我在这里发帖。希望 StackOverflow 的 SEO 力量能让人们更容易找到它。

The documentation for how to do this is extremely difficult to find, hence my motiviation for posting and self-answering.

Enabling Analytics Support for Unsigned Google Checkout Carts for Google Analytics ECommerce Tracking:

This method applies for any cart that does not use 'signed' carts or server-to-server API calls. Basically, the 'simplest' method of setting up Google Checkout. If signed carts and server-to-server API calls don't mean anything to anyone, it's probably this way.

First, you must make sure that the standard Google Analytics snippet is not included on pages with the Cart.

Second, you must append an attribute value to the cart.js tag already on the site, as aid="UA-XXXXXX-X", where UA-XXXXX-X is the account code for the site.

Here's the example:

<script id="googlecart-script" type="text/javascript"
src="http://checkout.google.com/seller/gsc/v2/cart.js?mid=MERCHANT_ID"
aid="UA-XXXXXX-X"
currency="USD">
</script>

That's all you need to do. It's shockingly easy to do, but almost impossible to find this documentation, hence my posting here. Hopefully, the power of StackOverflow's SEO will make this easier for people to find.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文