Showing posts with label site optimization. Show all posts
Showing posts with label site optimization. Show all posts

Tuesday, February 3, 2015

Page size by position in the site structure

Large sites have specific requirements at times, for example when checking for site speed optimization.
One factor influencing page speed, usability and ease of being crawled by search engines is the total page size. With millions of pages, how can focus our work beyond just finding examples of what works and what not?

We ran an internal crawler to identify the pages collecting data on page size for each page. Second step then was visualization, to see if there is a pattern that allows us to focus on high impact areas. 



For a small part of the site (!), this is the printed plot of the page weight (with R) based on the number of “/” (-3) = folder depth, adjusted for the htt://dell/ slashes. As a result, http://www.dell.com/index.aspx would be 0, and http://www.dell.com/suppport/home would be level 1. 

Based on the graph we were able to clearly identify the area where large pages sit, and were able to narrow it down to a type of page. This gave the necessary information to work with Dev and Design to improve the site significantly. 

We also identified a range of descriptive statistics numbers, and the 'outliers' and could fix these immediately - like many will have guessed, not optimized pictures were the issue, and easily remedied. 

Thursday, April 3, 2014

Pull data for video sitemap

Video sitemaps are sometimes helpful to make Search engines aware of videos on a site. We use several systems to generate pages with videos, and as a result it is not easy to get information from the back-end to generate sitemaps. So - like Google - we have to take it from the front end as much as possible. This script with details is likely limited to just Dell.com, and even here I have found that videos in some sections are not able to be indexed by this. Still, this has been extremely helpful to find the 'hidden' details on our video implementations. (And yes, we have requirements to change these in the process since a while :-) ).

Elements necessary for a sitemap are:
  1. Pageurl
  2. Title
  3. Keywords
  4. Description
  5. Video URL
  6. Thumbnail url
And this scripts pulls it nicely of many of our video pages. (We use open graph tags, which makes it relatively easy to pull most info). The script needs to be called with the filename of the text list of urls as first parameter ( . script.sh listofpages.txt)
if [[ ! $1 ]] ; then
echo "need to call with filename"
exit 1
fi
file=$RANDOM-sitemap-data.txt
echo $file
echo -e "url\tTitle\tthumbnail\tdescription" > $file
while read -r line; do
filecontent=$(wget -qO- "$line")
wait
(echo "$line" | sed 's/\r$/\t/' | tr '\n' '\t'  && echo "$filecontent" | grep "og:video" | grep "swf" | sed -e "s/^.*content=\"//" -e "s/\".*$//" | sed 's/\r$/\t/' | tr '\n' '\t'  && echo "$filecontent" | grep "og:title" | sed -e "s/^.*content=\"//" -e "s/\".*$//" | sed 's/\r$/\t/' | tr '\n' '\t' && echo "$filecontent" | grep "og:image" | sed -e "s/^.*content=\"//" -e "s/\".*$//" | sed 's/\r$/\t/' | tr '\n' '\t' && echo "$filecontent" | grep "og:description" | sed -e "s/^.*content=\"//" -e "s/\".*$//" )  >> $file
done < "$1"
cat -A "$file"


As always - I use this, and would love to hear tips to improve or see other scripts for site optimization and maintenance.


Bookmark and Share