网站在Google Analytics(分析)报告中显示为自己网域的推荐人。为什么? [英] Site is showing up as a referrer to its own domain in Google Analytics reports. Why?

查看:116
本文介绍了网站在Google Analytics(分析)报告中显示为自己网域的推荐人。为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到两个Google Analytics(分析)报告问题,我管理的网站我不知道如何解决: 强大>在GA报告中显示为自己的域名。

  • 我的目标完成(第三方域外
    电子商务购物车的销售转化)为当我
    显然希望看到发送流量
    的真正的查阅者时,所有显示网站的域名为来源

  • 我对可能发生这种情况的原因有一些想法:

    我使用内部绝对路径链接,如下所示:

     < a href =http://example.com/contact.html> 

    而不是

     < a href =/ contact.html> 

    这可能吗?用户在购买之前经常在内部点击。



    另外,在几个高流量页面上,我使用了javascript历史反向链接,如下所示::

     < a href =javascript:history.go(-1)>返回< / a> 

    最后,我正在对添加到购物车点击量进行301次重定向, p>

      http://example.com/add_to_cart 

    重定向到:

      http://paymentprocessor.com/ugly_url/cart_page.html 

    (虽然这是一个外部的第三方域,但我的GA代码仍然在那里触发)



    任何猜测为什么我遇到上面提到的问题? ... ...感谢你所有的GA向导。






    UPDATE UPDATE UPDATE



    非常感谢Eduardo。

    以为我现在可能会将它分享给第三方ecomm站点的href文本链接我通过class跟踪jquery事件,所以我的_gaq.push跟踪了click事件并将cookie数据从我的网站复制到第三方网站,如下所示:

      $('a.index_addtocart_smallest') .click(function(){
    _gaq.push(['_ trackEvent','Outbound Links','index_addtocart_smallest','buy_click'],['_ link','ssl.thirdpartyecom.net/order/'] );
    });

    当我使用表单动作add to cart在HTML中提交时,请看这样:

     < form action =http://example.com/add_to_cartmethod =postonsubmit =that = this ; _gaq.push(['_ trackEvent','Outbound Links','index_big_buy_button','buy_click'],['_ linkByPost',this]); setTimeout(function(){that.submit()},100); return假;> 

    ...跟踪事件,并将现有Cookie发布到第三方服务器,同时添加延迟点击,以确保它被GA捕获。



    在我的情况下,我使用异步语法来在域和另一个域上的子目录之间进行跟踪: https://developers.google.com/analytics/devguides/collection/ gajs / gaTrackingSite#domainAndSubDirectory

    解决方案

    在您的情况中,很明显问题在于购物车。当您将用户重定向到您的购物车域名时,他会登录到一个新域名,并且无法访问他在您的网站上使用的Cookie。由于GA需要在购物车网站上创建一套新的Cookie,因此它还会创建一个新的访问者ID和一次新的访问,该访问将是一个自我推荐,因为这是来自GA观点的访问者所在的位置。

    Google Analytics会在Cookie上保留状态__utm *。因此,在更改域名时,我们需要将Cookie从您当前所在的域复制到要迁移到的域。谷歌分析API提供了一些方法来实现这一点。这通常称为跨域跟踪或多域跟踪。 Google Analytics文档提供了有关如何实施的很好解释。您还可以搜索堆栈溢出以了解与跨域跟踪相关的几个问题,但人们似乎很难将其正确使用。



    您可以自由使用绝对或相对链接,它根本不会影响Google Analytics。



    Javascript重定向通常是可以的。即使有些情况下,它们肯定会让事情变得更加困难,但您的后退按钮使用情况良好,应该不会造成任何问题。当然,如果JavaScript重定向改变了你所在的域名,并且需要实现跨域跟踪。



    有时候内部引用者是合法的。合法自我推荐的一个示例:当用户访问您网站上的一个页面并在此停留超过30分钟时,然后导航到第二页。在这种情况下,30分钟后访问到期,当他导航到第二页时,创建新的访问。这次新的访问将是自我介绍,第二页将被视为登陆页面。这看起来可能很奇怪,但这是一个自我介绍,通常很好。


    I am having two GA reporting problems with a site I manage that I am not sure how to solve:

    1. The site is showing up as a referrer to its own domain in GA reports.
    2. My goal completions (sales conversions on 3rd party off-domain ecommerce cart) are all showing the site's domain as "source" when I obviously want to see the true "referers" who are sending traffic that results in goal completions.

    My thoughts on potential reasons why this could happening:

    I am using absolute paths for internal links, like this:

    <a href="http://example.com/contact.html">
    

    as opposed to

    <a href="/contact.html">
    

    Could this be it? Users often do click around internally before they purchase.

    Also, on several high traffic pages, I am using javascript history backlinks, like this ::

    <a href="javascript: history.go(-1)">go back</a>
    

    Lastly, I'm doing a 301 redirect on "add to cart" traffic clicks so that

    http://example.com/add_to_cart
    

    redirects to:

    http://paymentprocessor.com/ugly_url/cart_page.html
    

    (Although this is an external 3rd party domain, my GA code still fires there)

    Any guesses why I am experiencing the issues stated at the top here? ... thank you to all you GA wizards.


    UPDATE UPDATE UPDATE

    Thanks Eduardo for the great answer.

    Thought I might share that now for href text links to 3rd party ecomm site I am tracking events with jquery via class, so my _gaq.push to track both the click event and copy the cookie data over from my site to the third party site looks like this:

    $('a.index_addtocart_smallest').click(function(){
        _gaq.push(['_trackEvent', 'Outbound Links', 'index_addtocart_smallest', 'buy_click'],['_link', 'ssl.thirdpartyecom.net/order/']);           
        });
    

    And when I use the form action "add to cart" submit in the HTML look like this:

    <form action="http://example.com/add_to_cart" method="post" onsubmit="that=this;_gaq.push(['_trackEvent','Outbound Links','index_big_buy_button', 'buy_click'],['_linkByPost', this]);setTimeout(function() { that.submit() }, 100);return false;">
    

    ... to track the event, and post the existing cookie to third party server, while adding a delay to the click to make sure it is captured by GA.

    In my case I am using the asynchronous syntax for Tracking Between a Domain and a Sub-Directory on Another Domain: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#domainAndSubDirectory

    解决方案

    In your case it's very clear that the problem is with the cart. When you redirect the user to your cart domain he lands on a new domain and lose access to the cookies that he was using on your site. Because GA needs to create a new set of cookies on the cart site it also creates a new visitor id and a new visit, that visit will be a self referral because that's where the visitor is coming from from GA point of view.

    Google Analytics keeps state on cookies, __utm*. So when changing domains we need to copy the cookies from the domain you are currently in to the domain you are moving to. The google analytics API offers some methods to implement this. This is often known as "cross-domain tracking" or "multiple domain tracking". Google Analytics documentation offers a good explanation on how to implement it. You can also search Stack Overflow for several questions related to cross-domain tracking, people seem to have a hard time getting it right.

    You are free to use absolute or relative links, it makes no difference for Google Analytics at all.

    Javascript redirects are usually ok. Even though there are cases where they certainly make things a little bit more difficult your use case of a back button is fine and should not be causing any problems at all. Of course if the javascript redirect changes the domain you are in you are back to the same issue and needs to implement cross-domain tracking.

    Sometimes internal referrers are legitimate. One example of legit self referrals: When a user visits a page on your site and stay there for over 30 min, then navigates to a second page. In that case after the 30 minutes the visit expires and when he navigates to that second page a new visit is created. This new visit will be a self referral and the second page will be considered a landing page. That might seem odd at first, but this is a self referral and it's usually fine.

    这篇关于网站在Google Analytics(分析)报告中显示为自己网域的推荐人。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆