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:
redirected to:
http:
(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