A site is displayed as a referrer to its domain in Google Analytics reports. What for?

I had two problems with GA reports with a site that I manage, which I'm not sure how to solve:

  • In GA reports, a site appears as a referrer in its own domain .
  • My goal is completed (sales conversions on a third-party e-commerce outside the domain) - everyone shows the site’s domain as a “source” , when I obviously want to see the true “referees” that send traffic, which leads to the completion of the goals.

My thoughts on potential reasons why this could happen:

I use absolute paths for internal links, for example:

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

Unlike

 <a href="/contact.html"> 

Could it be? Users often click on the inside before purchasing.

Also, on multiple pages with high traffic, I use JavaScript history backlinks, like this:

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

Finally, I do 301 redirects to add to cart clicks to

 http://example.com/add_to_cart 

redirected to:

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

(Although this is an external third-party domain, my GA code still works there)

Any guesses why I ran into the problems outlined here above ... ... thanks to all of you wizards of GA.


UPDATE UPDATE UPDATE

Thanks to Eduardo for the excellent answer.

I think I could share this now for href text links on a third-party ecomm site. I track events using jquery through the class, so my _gaq.push tracks both the click event and copies the cookie data from my site to the third party site as follows:

 $('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 "add to cart" form action, submit it in HTML, 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 send the existing cookie to a third-party server, adding a delay to the click to make sure it is captured by GA.

In my case, I use asynchronous syntax to track between a domain and a subdirectory in another domain: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#domainAndSubDirectory

+4
source share
1 answer

In your case, it’s very clear that the problem is with the cart. When you redirect a user to his cart, he lands on a new domain and loses access to the cookies that he used on your site. Since GA needs to create a new set of cookies on the cart site, it also creates a new visitor identifier and a new visit, this visit will be an independent referral, because that is where the visitor comes from the GA perspective.

Google Analytics stores cookie data, __utm *. Therefore, when changing domains, we need to copy cookies from the domain in which you are currently located to the domain to which you are moving. The Google Analytics API offers some methods to implement this. This is often referred to as cross-domain tracking or multi-domain tracking. The Google Analytics documentation offers a good explanation of how to implement it . You can also look for stack overflows on several cross-domain tracking issues, it seems to people hard to find them correctly.

You can use absolute or relative links, it does not matter for Google Analytics.

Javascript redirects are usually ok. Despite the fact that there are times when they, of course, make things a little more complicated, your case of using the back button is fine and should not cause any problems at all. Of course, if the javascript redirection changes the domain you are in, you are returning to the same problem and should do cross-domain tracking.

Sometimes internal referrers are legal. One example of legitimate referrals: when a user visits a page on your site and stays there for more than 30 minutes, he goes to the second page. In this case, after 30 minutes, the visit ends, and when he goes to this second page, a new visit is created. This new visit will be an independent referral, and the second page will be considered the landing page. It may seem strange at first, but it is a self-essay, and it is usually normal.

+6
source

Source: https://habr.com/ru/post/1434984/


All Articles