Welcome to WebmasterWorld Guest from 107.22.87.205

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

GA Code - DNS Prefetch?

     
10:19 am on Dec 10, 2013 (gmt 0)



Hi All,

I was looking through a page for GA code, but what I found was a dns lookup link like this

<link rel="dns-prefetch" href="//google-analytics.com" />

Is this an alternate to the normal GA code implementation process?

This is the first time I'm seeing this, would you please be kind to explain me how this works?


Thanks :-)
12:07 am on Dec 11, 2013 (gmt 0)

WebmasterWorld Administrator goodroi is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



DNS Prefetch is more about optimizing speed not tracking pages. You should still use the GA code. Also you might have some visitors using browsers that do not support prefetch.
6:39 am on Dec 11, 2013 (gmt 0)



Thanks :-)

But I don't see a tracking code on the page but only this <link rel= line..

I thought this is an alternate to the custom GA code implementation. I am confused then how GA reports the traffic data for this page if it had to have GA code in it?

Thanks again
9:31 am on Dec 11, 2013 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching#Controlling_prefetching_from_content
The content provider can force the lookup of specific hostnames without providing specific anchors using that hostname by using the rel attribute on the <link> element with a link type of dns-prefetch

...

Similarly, the link element can be used to resolve hostnames without providing a complete URL, by preceding the hostname with two slashes


I am confused then how GA reports the traffic data for this page if it had to have GA code in it?

this link rel element won't do anything on the google-analytics.com server - it simply does the domain name resolution to prefetch the IP address for that hostname.
if that page has no GA code, perhaps someone is tracking the click action on the link that got you there.
10:17 am on Dec 11, 2013 (gmt 0)



Thanks @phranque,

if that page has no GA code, perhaps someone is tracking the click action on the link that got you there.


I don't really know how this works. Could you please explain it to me? Unless the tracking code is available on the page itself how can GA reports the traffic stats for this page?
2:28 pm on Dec 11, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Unless the tracking code is available on the page itself how can GA reports the traffic stats for this page?

It won't. No tracking code = no statistics. Perhaps they removed the tracking code but forgot about the DNS prefetch?
1:48 pm on Dec 13, 2013 (gmt 0)



Thanks @robzilla

It won't. No tracking code = no statistics.
If that's the case how come I can be able to pull traffic stats from GA until this day? I'm much confused, all these days, I thought this dns prefetch is an alternative to GA tracking codes like the Google webmaster tools option where you can either put a meta or upload a html file to verify your site :(

Perhaps they removed the tracking code but forgot about the DNS prefetch?
Again what's the use of DNS prefetch? Or what negative impacts it has?

Thanks!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month