Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
My records show a particular page of my web site was visited 609 times between July 2 and November 15.
Google Analytics reports only 238 page views during that time.
I can't explain this discrepancy.
For Google Analytics to track a page view event, the client browser must have JavaScript enabled and be able to access Google's servers. I doubt 60% of my visitors have either disabled JavaScript or firewalled outbound traffic to Google's tracking servers.
Do you have any explanation?
More Info
My application simply puts a record into a database as it serves up a page.
It doesn't do anything to distinguish a bot viewer from a human.
The disparity is almost certainly from crawlers. It's not unheard-of for crawler traffic to be 10x user traffic.
That said, there's a really easy way to validate what's going on: add an ASPX page which emits a uncacheable, 1x1 pixel clear-GIF image (aka "web bug") to every page on your site, and include an IMG tag referencing that image on every page on your site (e.g. in a header or footer). Then parse your logs for hits to that image, looking at a query-string parameter on the image call (e.g. "referrer=") so you'll know the actual URL of the pageview.
Since crawlers and other bots don't pull images (well, Google Images will, but not images sized as 1x1 pixel in the IMG tag!), you'll get a much more accurate count of pageviews. Behind the scenes, most analytics software (including Google Analytics) uses a similar approach-- except they use javascript to build the image URL and make the image request dynamically. But if you use Fiddler to watch HTTP requests made on a site that uses Google Analytics, you'll see a 1px GIF returned from www.google-analytics.com.
The numbers won't line up exactly (for example, users who quickly cancel a navigation via the back button may have downloaded one image but not the other) but you should see roughly comparable results. If you don't, then chances are you don't have Google Analytics set up correctly on all your pages.
Here's a code sample illustrating the technique.
In your header (note the random number to prevent caching):
<img src="PageviewImage.aspx?rand=<%=new System.Random().NextDouble( )%>&referer=<%=Request.UrlReferrer==null ? "" : Server.HtmlEncode(Request.UrlReferrer.ToString()) %>"
width="0" height="0" hspace="0" vspace="0" border="0" alt="pageview check">
The image generator, PageviewImage.aspx :
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType="image/gif";
string filepath = Server.MapPath ("~/images/clear.gif");
Response.WriteFile(filepath);
}
BTW, if you need the image file itself, do a Save As from here.
This is of course not a substitute for a "real" analytics system like Googles, but if you just want to cross-check, the approach above should work OK.
Could the rest of the page views be from crawlers - either Googlebot or others?
Are you looking at unique page views in Analytics and total page views in your logs?
Probably crawlers. Our website was being hit every couple of hours by robots.
Are you positive the site is working properly in all browsers? I've seen analytics thrown off by pages that fail to render properly in Firefox but work fine in IE, and vice versa.
Maybe the tracker of your web pages record every hit, even if it comes from the same IP address (same surfer hits the page twice).
It is not, many visitors have javascript turned of or have the customize google firefox extension installed.
Given the time stamp of the last comment, I thought I'd leave an update here; Google Analytics recently announced they'd let people opt-out of Google Analytics, on the user-side, meaning if you didn't want website owners to track your movements, you could effectively become invisible on sites that are measured by Google Analytics. this could further offset your data points. in a sep thread, I suggested running two web analytics tools (many free to choose from) to measure against each other.
Justin's answer is very good. I would just add this as a comment but I'm lacking powerpoints :P
One thing to keep in mind, too, when comparing analytics systems, is that there's always some discrepancy to be expected:
The methodology of page tagging with JavaScript in order to collect visit data has now been well established over the past 8 years or so. Given a best practice deployment of Google Analytics, Nielsen SiteCensus or Yahoo Web Analytics, high level metrics remain comparable. That is, can be expected to lie between 10-20% of each other.[ link ]
Related
So I've been working on a website for a while. GA account has been up for a couple months but I waited for the website to be finished before putting up the actual JS tag.
In the meantime, the website is being HTTP password restricted (basic authentication) so it isn't even accessible unless you know the user/pwd combination.
To my surprise, I realized today that GA has logged several hundred views to the root of my website. Paths are mostly things like:
/
/?from=http://social-widget.xyz/
/?from=http://www.traffic2cash.xyz/
Bounce% and exit% both at 100% for all of them.
I realize this looks like referral spam, and there are ways to prevent it. Came across this upon googling:
http://botcrawl.com/block-social-widget-xyz-referral-spam-in-google-analytics/
My question is: how can GA log anything anyway when no tag is up and the website isn't even accessible?
Thank you very much in advance
Because it's spam. They hit Google Analytics directly with random GA codes and don't even go through your website.
GA can't tell if these are real hits (from website visits) or fake hits (from spam bots who hit GA directly calling the same ode as they would if on the website). Though arguably they should do more about this.
Massively annoying - particularly when first starting out as this can be a heavy proportion of your "traffic".
It's easy to set up a filter rule is to catch a lot of this by filtering on hostname. As they are randomly hitting GA and don't even know what website they are hitting GA for, they don't usually set this correctly. Real traffic should only come from yourwebsitedomain.com so add a filter for that.
STRONG piece of advice: abandon the default UA-########-1 tracking code of your new website -- simply do not use it!
Create a second and third property on the Admin screen, then use the tracking code for the third property. You will immediately see a lot less spam. No filters or segments necessary!
If you want the whole sad story about spam visits in GA, I have been maintaining the Definitive Guide article for over a year now:
http://help.analyticsedge.com/spam-filter/definitive-guide-to-removing-google-analytics-spam/
Hypothetical Situation: I have a small obscure website called "miniatureBoltsInCarburetors.com" which provides content about the miniature bolts which hold a carburetor together as well as some general related automotive information. My site also has a single page which allows someone to find the missing bolt in their carburetor, and while no one will access this page directly from my website, one billion other popular automotive sites have embedded this single page in their website using an iframe, yet not included a link back to my site.
I recognize that this question is related to SEO which is considered off topic, however, all of the many SEO related forums discuss the marketing steps one could take, and not the programming steps or strategies, and hope others will allow this question to be answered here.
I wish my site "miniatureBoltsInCarburetors.com" to be ranked high for general automotive searches. What could I do to allow the 3rd party sites which include an iframe back to my site to improve my ranking? Could using JavaScript in the iframe to create a link on the parent page provide any value? What about when my server renders the page, use PHP to get the referring URL from $_SERVER, and include it in the content?
I am providing a solution here. Not sure if this is what you want though.
In your page which is used by other websites in iframe you can put below Javascript. This javascript checks if the webpage is opened inside an iframe or directly in browser.
So using this check when you see it is opened in an iframe. On click on something navigate to your website.
// This works in all browsers
function inIframe () {
try {
return window.self !== window.top;
} catch () {
return true;
}
}
Also for your reference you can check the below URL.
How to prevent my site page to be loaded via 3rd party site frame of iFrame
Hope it helps.
Iframes are seen seperate pages by Google. Your approach may end up being penalized due to being sourced from untrusted site. According to Google Webmaster Support
Frames can cause problems for search engines because they don't
correspond to the conceptual model of the web. Google tries to
associate framed content with the page containing the frames, but we
don't guarantee that we will.
One of the best approaches to rank higher for a specific keyword is, make multiple related sites. In your case a 3-4 paged site about carburetors, bolts, other things your primary site contain would do it. These mini sites will be more intense about the subject due to less page count. Of course they should contain unique articles on each page. Then link from mini websites to primary websites and you can see the dramatic change.
In fact, the thing you are trying to do was a tactic to rank competitors down worked occasionally a few years ago. Now, it is still a risk.
I see. You don't want to mess up the page for your own site, but you want to do something with all the uncredited embeddings.
The solution is fairly simple:
Create a copy of the page.
Switch your site to use the copy.
Amend the version that countless other sites are embedding, so that there is a small link back to you. Or, add an iframe blocker script that will load your site.
If the page is active (ie user interacts with it to find the missing bolt) you could include a sales message with the response encouraging the user to visit your site.
I think that your goal is getting your link onto these other sites long enough to get indexed by Google before it is noticed by the people doing the embedding, so it's a bit of a balancing act.
I see conflicting advice about how Google indexes iframes. You should use a PageRank checker to see if the existing iframe page url has PageRank, and compare it to the page that you embed it on.
I dont Think you need to worry ,.
Google bot does seem to crawl through Iframes ,but the Web-Page Containing that Iframe is not Credited for that Content .. In other Words,, Page-Ranking of that particular Web-Page do not Change due to Contents from Iframe .
is IFrame crawled by Google?
Do robots crawl iframes?
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've wanted to apply google analytics on my music page at www.soundclick.com/bands/default.cfm?bandid=976533
But I am unable to use that URL as my default on analytics because it contains a query.
I have a Domain URL at www.SilentNoizeMusic.com that forwards to the above address, but I'm questioning if using the www.SilentNoizeMusic.com url as my default on Analytics will actually track the stats for the real site.
Are my suspicions correct?
If so, is there any sort of workaround, like a modification to the original URL that could bypass the query error but still direct to the same page to be tracked?
(as a side note, I'm not sure how relevant it would be to any potential answers, but the music hosting site I'm using does not allow javascript, which is what initially prevented my from using analytics since I couldn't paste the tracking code. I have found a workaround that I want to test out, but I just need to fix the above problem in order to do so.)
Thanks
If you are using domain forwarding provided by your DNS server, then no, Google Analytics won't be able to track stats of visitors who reach your soundclick.com page via your SilentNoizeMusic.com URL.
Some DNS providers offer a "domain cloaking" option, which makes the destination page appear in the browser at your SilentNoizeMusic.com URL. All this is doing is returning an HTML page containing an iframe that loads the destination page. Cloaking is a terrible hack and not very reliable, since any link clicked on in the destination page (inside the iframe) will cause the browser to navigate to the destination page anyway.
Another approach might be to try to embed a trackable item in the destination page. You said that soundclick.com doesn't allow you to embed javascript; do they allow you to embed HTML?
Option 1: See if you can embed an iframe in the html of your soundclick.com page. Point the iframe to an html page on some other web server that you have control of, and put your javascript and google analytics stub in there. The javascript won't violate the 'no javascript' mandate of soundclick.com, because it won't be executing in the context of soundclick.com - it will be sequestered inside the iframe. The iframe doesn't even have to be large enough to show on your soundclick.com page. Just having it there will be enough to get the sequestered page to load, and that's all that Google Analytics really needs. You won't get any stats about what the user is doing on the soundclick.com page, and you won't get any referal data (what sites contain a link to yours that users clicked on to get to your site) but you should get full stats about number of visitors, new vs returning, etc.
Option 2: If soundclick.com doesn't allow you to put an iframe HTML element on your page, will they allow you to reference an image on another server? Again, set up an image file (preferably small) on a server you have control of and place an link on the soundclick.com page referencing the image on the other server. You can then collect request stats on the image file, which will give you some small degree of traffic measurement. This is what the old-school hit counters did, basically.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have studied most of the posts concerning web page being viewed in an iframe here but I was wondering if this can hurt the SEO of the framed site! I own a niece blog, lets call it mynieceblog.com and I recently found out that my web content, mynieceblog.com/mypostname.html, is viewed in an iframe by a site acting like a blog aggregator. A toolbar exists on top (has a closing button) and the url looks like aggregator.com/content/myposttitle.html The visitor can view my entire site content through this iframe and has the opportunity to visit relevant posts of other aggregated blogs. Here are my questions:
a. When a user visits mynieceblog.com/mypostname.html who gets to see visits/impressions on his google analytics?
b. Do I get incoming links from aggregator.com? Could this be possible only if the user closes down the toolbar?
c. Does this hurt the ranking of mynieceblog.com since I both see mynieceblog.com/mypostname.html and aggregator.com/content/myposttitle.html in search engine results for some keywords?
The view of my blog content through this aggregator does not hurt my site reputation. I have read that bandwidth use is an issue too! I am more concerned about my rankings and page views.
It can't harm you and probably gives you some credit. You found it yourself so it's getting traffic.
Your own Google Analytics code will be run so you will see the visitors. You can actually tell who is framing your website via the Hostname parameter in Google Analytics. Hostname seems to get set to the domain shown in the address bar.
Google does see the link but how much ranking you get from that is unknown. Somewhere between 0 and 100%! I have recently read a test where someone believed some framed content was indexed.
It cannot hurt your ranking. Worst case is that it ranks higher for a keyword so Google presents their page for you instead of yours directly.
If you're really worried about it then you could implement some JavaScript code to make your page break out of the frame. Something like this:
if (top.location != location) {
top.location.href = document.location.href;
}
If your viewer views your website through aggregator.com then surely i wont help you for SEO. For good SEO viewers needs to visit your site directly from aggregator.com
It's not a question of hurting your site reputation - it won't; however, will it benefit your site? I'm unsure, but if you get any benefit, I imagine it would be less than if your site was access directly.
As this article suggests, the SEs may be able to spider your content through the aggregator, but the aggregator won't gain from your content (framed content is rightly considered to be outside the site), and given the dynamic architecture of many aggregators, you may also not gain much/anything.
I would imagine that the you could consider exposure of your site through an aggregator could be considered an in-bound link, but it is unclear whether SEs would agree.
Site A gives their affiliates an interactive component (traffic map based on Google Maps), which they in turn put on their sites (Site B) in an iframe. The component is dynamic, doesn't change the URL of parent site, and has an id for each affiliate site.
What I would like to do is track the displays of the component. (Price of using Google Maps for the component depends on number of views).
At the moment the component is in <iframe src="http://SiteA.com/q?cp=43.520,18.910,10&cm=1"></iframe>.
I have looked at the other topics but didn't found a solution to that problem. I would really appreciate any help, I had no experience with cross-site tracking yet.
You as siteA owner want to count number of displays of iframe on other sites, correct?
The basic way to do it is logs analysis — every time your server returns page http://SiteA.com/q?cp=43.520,18.910,10&cm=1 or similar it adds an entry to your server's log files. The can be count when. There is a number of solutions for analyzing log data. Some of them opensource and free, other are paid services. For exmaple: http://awstats.sourceforge.net/
There is other ways to count it, but it's probably easiest way of all.