Kentico Google Analytics page view - google-analytics

I'm looking at the GA traffic and I'm seeing page views for pages like this: /cms/getdoc/2d22c1db-ae83...angobjectlifetime=request
Is this page used when a user is viewing a document (PDF, Word, etc.)?

Not necessary. It could be any page within the content tree (including files). The cms prefix means it requires authentication (it's usually within the administration interface) and the getdoc handler means the url is permanent one (uses the GUID that follows), so you always get this page/file no matter where in the content tree it is (after you move it for example)

Google Analytics records anything hit to your website which is used to access either to access a legitimate page or used to access a resource on your website. You should use filters during report to filter out this data.

Related

firebase storage custom html page for errors like permission denied?

Is there a way to show a custom html page or redirect a user when storage throws errors like if file is not available, not sufficient permissions or in case of any other issues when the file can't be accessed/displayed?
So instead of the below
We need to show a custom page with our brand designs.
What are the options here?
No, there is not. You are using an API endpoint (download URL) meant for programmatic consumption or inline page insertion, not for loading into a browser to present a full web page.

How to track a PDF view (not click) on my website using Google Tag Manager

How can I track that someone visited the following URL of my website http://www.website.com/mypdf.pdf.
I tried using a Page View trigger on a Page View tag. I'm completely new at Google Analytics so not sure how to proceed. Most people are going to be going to that pdf directly via URL, as there is no link to it on my website, but I really want to be able to track how many people view it.
Thanks in advance!
You cannot track PDF views with the help of GTM. GTM for web is a javascript injector, and one cannot inject Javascript into a PDF document from the browser.
One way to circumvent this is to have a gateway page, i.e. have the click go to a HTML page that counts the view before redirecting to the document in question (naturally you could use GTM in that page). Since people go directly to the PDF URL this would require a bit of scripting - you would have to redirect all PDF links to your gateway page via a server directive, count the view and then have the page load the respective document.
Another even more roundabout way would be to parse your server log files and send PDF requests to GA via the measurement protocol (actually many servers allow to have log writes redirected to another script, so you could do this in realtime). I would not really recommend that approach - it's technologically interesting, but probably more effort than it is worth.
The short version is, if you are not comfortable fiddling a little with your server setup you will probably not be able to track pdf views. GTM does not work on PDF files.
Facing same issue…
My solution was to use url shortener (like bitly.com) which includes opening statistics.
Not the perfect solution but it works for direct pdf access from external source (outside your site).

Access to sitemap?

i created a site map with the name "Web.sitemap" in the root folder, and i need to feed this to google keywords. Any idea how i can access this file? I tried (domain)/Web.sitemap , but it doesn't load.
What is the proper way to access this file?
Thanks
Web.sitemap is typically used by the Sitemap control in ASP.NET to render menus and what not. It is not exposed publically, and in fact the default IIS configuration will block it from being loaded through the browser.
You may be thinking of a sitemap.xml file, which is an XML description of every page on your site used by search engines and crawlers. More information on this can be obtained from http://www.sitemaps.org/protocol.php
Not sure what you mean by feeding it to "Google keywords"? But if you want to submit a sitemap to Google Webmaster Tools (and search engines in general), it is an XML sitemap following the XML sitemaps protocol you want (as Mike wrote)

Tracking File Downloads with Google Analytics

I have an html file that gets loaded when a user connects a flash drive to their PC. That HTML contains a direct link to a PDF on our server. (They don't want to put the PDF on the drive for some reason) Anyway, I'm trying to figure out how to track how many times this PDF is accessed from one of these drives.
Since the user is being taken directly to the file and not a landing page, is there a way I can attach analytics to the link that directs the user to the file? I was thinking a Virtual Page View would work but I don't understand exactly how GA would be getting that data.
Can anyone help demystify this?
GA needs to run javascript. PDFs will not invoke a call to GA when hit directly from search results, emails, or flash drives.
You might be able to track it by creating a rewrite rule on your server to a page that runs the GA code then loads the PDF on that page.
I had a similar feature on my site and it worked well except that while tracking the PDFs, the page that loaded the PDF was inflating my pageviews numbers. I didn't want PDF's to be mixed in with pageviews because it confused the client who had been used to separating the two. I created a filter for the PDF 'calling' page and the pageview number settled back down.
I ended up removing this method and falling back to the server logs for PDF downloads and GA for everything else.
GA is a javascript tracker. Plain and simple.
The issue is not the JavaScript, since you can include that locally, but the fact that GA won't work on HTML loaded from a filesystem.
The landing page can be built so that it automatically triggers the download and GA while that happens. Pageviews won't be an issue, since downloads should be tracked as events anyway.
You can attach a javascript function to the link and have it track the page view with Google Analytics
Check this out for more.
It's an easy way to track any file download on a website.

Updateable Google Sitemap for ASP.NET 3.5 Web App Project

I am working on an ASP.NET 3.5 Web Application project in C#. I have manually added a Google-friendly sitemap which includes entries for every page in the project - this is not a CMS.
<url>
<loc>http://www.mysite.com/events.aspx</loc>
<lastmod>2009-11-17T20:45:46Z</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
The client updates events using an admin back-end. Other than that, the site is relatively static. I'm trying to decide on the best way to update the <lastmod> values for a handful of pages that are regularly updated.
In particular, I am using the QueryStringField of the ListView control to enhance SEO as described here:
https://web.archive.org/web/20211029044137/https://www.4guysfromrolla.com/articles/010610-1.aspx
http://gsej.wordpress.com/2009/05/31/using-a-datapager-with-both-a-querystringfield-and-renderdisabledbuttonsaslabels/
When the QueryStringField property is set, the DataPager renders the paging interface as a series of hyperlinks which the crawler can follow and index. However, if Google has crawled my list of events two days ago, and in the meantime, the admin has added another dozen events... say the page size is set to 6; in this case, the Google SERP links would now be pointing to the wrong pages. This is why I need to be sure that the sitemap reflects changes to the events page as soon as they happen.
I have already looked though other SO questions for info and didn't find what I needed. Can anyone offer some guidance or an alternative approach?
UPDATE:
Since this is a shared hosting environment, a directory watcher/service won't work:
How to create file watcher in shared webhosting environment
UPDATE:
Starting to realize that I may need signify to Google that the containing page has been updated; update the last-modified HTTP header?
Rather than using a hand-coded sitemap, create a sitemap handler that will generate the sitemap on the fly. You can create a method in the handler that will grab pages from an existing navigation sitemap, from the database, or even from a hard-coded list of pages. You can create an XmlDocument from the list, and write the InnerXml of the document out to the handler response stream.
Then, create a class with a method that will automatically ping search engines with the above handler's URL (like http://www.google.com/webmasters/tools/ping?sitemap=http://www.mysite.com/sitemap.ashx).
Whever someone adds a new event, call the above method. This will ping Google using your latest sitemap (freshly generated by the above method).
You want to make sure that the ping only works if the sitemap has actually been updated. You could use File.SetLastWriteTime on events.aspx in the AddNewEvent handler to signify that the containing page has been updated.
Aslo, be careful to make sure there have been no pings for the last hour (as Google guidelines discourage pinging more than once per hour).
I actually plan to implement this in the following OSS project: http://cyclemania.codeplex.com. I will let you know once it's done and you can have a look.
If you let your user add events to the website you are probably using a database.
This means you can generate the XML-Sitemap at runtime like this:
create a page where your sitemap will be available (this doesn't need to be sitemap.xml but can also be sitemap.aspx or even sitemap.ashx).
open a database connection
loop through all records and create an Xml Element for each record
This blog post should help you further: Build a Search Engine SiteMap in C#.
It is not using the new XElements from .Net 3.5, but is will work fine.
You can put this in an aspx page, but adding an HttpHandler is probably better as described on the same blog, different post: (creating a httphandler for a sitemap)

Resources