在GTM中实施CPA联盟会员购买增强了电子商务

时间:2022-06-27 15:16:09

I'm implementing Enhanced Ecommerce on our (mainly affiliate) website through GTM. We have list views and detail views etc.. so implementing impressions and clicks is easy, but for affiliate purchases there is a problem.

我正在通过GTM在我们的(主要是联属网站)网站上实施增强型电子商务。我们有列表视图和详细视图等。因此,实现展示次数和点击次数很容易,但对联盟会员购买存在问题。

We have two payment models for the shops that are showing their products on our site:

我们为在我们网站上展示其产品的商店提供两种付款方式:

  • Cost per Click. I can implement a small purchase on the clickout page.
  • 每次点击费用。我可以在点击页面上实施小额购买。

  • Cost per Acquisition. Here is the problem: The purchases are made on a different website on a different time. Using PHP API's I get the purchases made a few times a day through a cronjob.
  • 每次收购成本。问题在于:购买是在不同的时间在不同的网站上进行的。使用PHP API,我通过cronjob每天购买几次。

How can I create a purchase (preferably using PHP, using javascript is messy on a cronjob) but retain the cookie value so I can link the purchase to the clickout and channel people used to get on our site.

我如何创建购买(最好使用PHP,使用javascript在cronjob上混乱)但保留cookie值,以便我可以将购买链接到点击并引导用户访问我们网站的人。

I thought of creating all zero purchases for each clickout and maybe repurchase using the same transaction ID. This might work, but we will end up with thousands of empty purchases.

我想为每次点击创建所有零购买,并且可能使用相同的交易ID进行回购。这可能有用,但我们最终会收到成千上万的空购买。

2 个解决方案

#1


1  

Reading the comment beneath the answer from Machavity, i assume that you are using Universal Analytics, or else Universal Analytics is the way to go!

阅读Machavity答案下的评论,我假设您使用的是Universal Analytics,否则Universal Analytics就是您的最佳选择!

I have had a case in the past where we had to think of a one way tracking system because we didn't have access to the other site's code.

我曾经有过一个案例,我们不得不考虑单向跟踪系统,因为我们无法访问其他网站的代码。

Give a look at the Google Measurement protocol. This protocol makes it possible to send raw userdata directly to google analytics over HTTP.

看看Google Measurement协议。该协议可以通过HTTP将原始用户数据直接发送到谷歌分析。

Link to Google measurement protocol

链接到Google测量协议

#2


2  

I ran across a similar problem a while back. Our checkout lives on a different domain. So when Adwords people would checkout after migrating to Universal, I was losing that data at checkout. I think my solution there could help you. This all assumed you're using Universal Analytics and not the old deprecated libraries.

我不久前遇到了类似的问题。我们的结帐位于不同的域名。因此,当Adwords人员在迁移到环球影业后结账时,我会在结账时丢失这些数据。我认为我的解决方案可以帮到你。这一切都假设您使用的是Universal Analytics而不是旧的已弃用的库。

The first thing I do is grab the GA cookie, which is named _ga. Inside it is your GA session. It looks like this (it will be much longer)

我做的第一件事是抓住GA cookie,名为_ga。里面是你的GA会话。它看起来像这样(会更长)

GA1.2.3456.7890

The third and fourth number sets (including the period) are the session itself. Parse them out.

第三和第四个数字集(包括期间)是会话本身。解析它们。

Now you want to find some way to store this with the user. I used my PHP session (we pass it in the query string when we jump domains) and stored it there. You'll have to figure something out that works for you here.

现在,您想要找到一些方法来与用户一起存储它。我使用了我的PHP会话(我们在跳转域时将它传递给查询字符串)并将其存储在那里。你必须在这里找到适合自己的东西。

On the other site we need to specify the GA session and site within the GA block. Please note that the new site will report these visits as if they belonged to the original site. The UA-XXXX-Y should be from the original site and yourdomain.com should be the new site TLD

在另一个站点上,我们需要在GA块中指定GA会话和站点。请注意,新网站会将这些访问报告为属于原始网站。 UA-XXXX-Y应来自原始网站,yourdomain.com应为新网站TLD

ga('create', 'UA-XXXX-Y', { 'cookieDomain': 'yourdomain.com', 'clientId': '3456.7890' });

Now you can pass your purchase metrics in. When a session converts on the new site, the old site will track it, along with any other things that session held (i.e. page impressions, Adwords clicks, etc.). You don't need any messy cron jobs to do this. Just be aware, as I said earlier, that these page visits belong to the original site as far as GA goes. You could try reporting two sets of metrics to get around this, but I have not tried that.

现在,您可以传递购买指标。当会话在新网站上转换时,旧网站将跟踪该网站以及会话所持有的任何其他内容(即网页展示次数,Adwords点击次数等)。你不需要任何凌乱的cron工作来做到这一点。请注意,正如我之前所说的,就GA而言,这些页面访问属于原始站点。您可以尝试报告两组指标来解决这个问题,但我还没有尝试过。

#1


1  

Reading the comment beneath the answer from Machavity, i assume that you are using Universal Analytics, or else Universal Analytics is the way to go!

阅读Machavity答案下的评论,我假设您使用的是Universal Analytics,否则Universal Analytics就是您的最佳选择!

I have had a case in the past where we had to think of a one way tracking system because we didn't have access to the other site's code.

我曾经有过一个案例,我们不得不考虑单向跟踪系统,因为我们无法访问其他网站的代码。

Give a look at the Google Measurement protocol. This protocol makes it possible to send raw userdata directly to google analytics over HTTP.

看看Google Measurement协议。该协议可以通过HTTP将原始用户数据直接发送到谷歌分析。

Link to Google measurement protocol

链接到Google测量协议

#2


2  

I ran across a similar problem a while back. Our checkout lives on a different domain. So when Adwords people would checkout after migrating to Universal, I was losing that data at checkout. I think my solution there could help you. This all assumed you're using Universal Analytics and not the old deprecated libraries.

我不久前遇到了类似的问题。我们的结帐位于不同的域名。因此,当Adwords人员在迁移到环球影业后结账时,我会在结账时丢失这些数据。我认为我的解决方案可以帮到你。这一切都假设您使用的是Universal Analytics而不是旧的已弃用的库。

The first thing I do is grab the GA cookie, which is named _ga. Inside it is your GA session. It looks like this (it will be much longer)

我做的第一件事是抓住GA cookie,名为_ga。里面是你的GA会话。它看起来像这样(会更长)

GA1.2.3456.7890

The third and fourth number sets (including the period) are the session itself. Parse them out.

第三和第四个数字集(包括期间)是会话本身。解析它们。

Now you want to find some way to store this with the user. I used my PHP session (we pass it in the query string when we jump domains) and stored it there. You'll have to figure something out that works for you here.

现在,您想要找到一些方法来与用户一起存储它。我使用了我的PHP会话(我们在跳转域时将它传递给查询字符串)并将其存储在那里。你必须在这里找到适合自己的东西。

On the other site we need to specify the GA session and site within the GA block. Please note that the new site will report these visits as if they belonged to the original site. The UA-XXXX-Y should be from the original site and yourdomain.com should be the new site TLD

在另一个站点上,我们需要在GA块中指定GA会话和站点。请注意,新网站会将这些访问报告为属于原始网站。 UA-XXXX-Y应来自原始网站,yourdomain.com应为新网站TLD

ga('create', 'UA-XXXX-Y', { 'cookieDomain': 'yourdomain.com', 'clientId': '3456.7890' });

Now you can pass your purchase metrics in. When a session converts on the new site, the old site will track it, along with any other things that session held (i.e. page impressions, Adwords clicks, etc.). You don't need any messy cron jobs to do this. Just be aware, as I said earlier, that these page visits belong to the original site as far as GA goes. You could try reporting two sets of metrics to get around this, but I have not tried that.

现在,您可以传递购买指标。当会话在新网站上转换时,旧网站将跟踪该网站以及会话所持有的任何其他内容(即网页展示次数,Adwords点击次数等)。你不需要任何凌乱的cron工作来做到这一点。请注意,正如我之前所说的,就GA而言,这些页面访问属于原始站点。您可以尝试报告两组指标来解决这个问题,但我还没有尝试过。