homepage Welcome to WebmasterWorld Guest from 54.205.189.156
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: Receptional & mademetop

Website Analytics - Tracking and Logging Forum

    
GA Code - DNS Prefetch?
shaunm




msg:4629233
 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 :-)

 

goodroi




msg:4629453
 12:07 am on Dec 11, 2013 (gmt 0)

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.

shaunm




msg:4629554
 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

phranque




msg:4629604
 9:31 am on Dec 11, 2013 (gmt 0)

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.

shaunm




msg:4629636
 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?

robzilla




msg:4629684
 2:28 pm on Dec 11, 2013 (gmt 0)

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?

shaunm




msg:4630424
 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!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved