Will Google Analytics track URLs that just redirect?

Will Google Analytics track URLs that just redirect? - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Will Google Analytics track URLs that just redirect? error on your web browser. Problem :


I have a link on my site. That links goes to another URL on my site. The code on the server sees that resource being requested and redirects the browser to another website. Will Google Analytics be able to know that the user requested the URL from my server and was redirected?



Specifically, I set up a /buy link on my watchmecode.net site to try and track who is clicking the "Buy & Download" button. This link/button hits my server, and my server immediately does a redirect to the PayPal processing so the user can buy the screencast.



Is Google Analytics going to know that the user hit the /buy URL on my site, and track that for me? If not, what can I do to make that happen?


Solution :

Short answer: no.



Google Analytics will only track a page view if the page loads and _trackPageview is called. You could call _trackPageview in a "Buy" click handler, but if you're going to do that I'd just fire an event instead.



Since you are redirecting server side this seems like it would be a good fit for their ECommerce API to post the transaction items client side before the redirect or when the user is redirected back to your site.



Also when the user does come back from your payment gateway you'll see refer to that page.



Looks like you can issue a server-side tracking event using the GIF API - see http://code.google.com/mobile/analytics/docs/web/#trackingparameters or http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshooting.html


It has been a while since I looked into Google Analytics but can't you simply call
urchinTracker on the onclick event?

We hope that this article has helped you resolve the google-analytics, redirects, error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=