Dear
Nathan,
Our agency webmaster
(who has recently left us) set us up last year with a Google Analytics code
and a Google Search code, which we applied globally to all our
pre-existing html pages and now use in our template for new pages.
Having separate html
pages did not deter us from implementing this, since our html editing software,
Dreamweaver, allows global insertions (done as search-and-replace operations
under the Edit menu) on any scale, whether within one document or within an
entire directory and all its subdirectories. I just searched for the
</head> code in all the pages in a target directory and replaced it with
the code below (as well as some graphic "buttons"), followed by a replacement
</head> code. I repeated the operation at the end of the
document too, targetting, I believe, the standard </body> code at the end
of the pages as my replacement anchor.
Here is a sample
page:
The visible search box up at the
top right uses Google's searching capability, but results are restricted to
only pages on our server. In essence, it serves as our own personal search
engine and keeps searchers who opt to use it from wandering off our
site.
The Google Analytics part of the code lets me run stats
on our hits for each day, month or year by logging on
to:
You can see the full
code and page layout of the MG index page linked to above by opening it up
and viewing the "source" code in your browser.
Here is the code
itself, which appears in a block inside the <head>...</head>
area.
<!-- Google Analytics
-->
<script type="text/javascript">
var gaJsHost =
(("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script
type="text/javascript">
try {
var pageTracker =
_gat._getTracker("UA-5972388-8"); pageTracker._trackPageview(); } catch(err)
{}</script>
And this is the
code that results in the display of the searching
box:
<p><form
action="http://www.google.com/cse"
id="cse-search-box" style="float: right;">
<div><font face="Arial, Helvetica, sans-serif" size="-2">Search
Archives Finding
Aids</font>
<br/>
<input name="cx" type="hidden"
value="000553501270288213378:lxu8vzvofh4"/>
<input
name="ie" type="hidden" value="UTF-8"/>
<input
name="q" size="21" style="border: #7e9db9 1px solid;padding: 1px;"/>
<br/>
<input name="sa"
type="submit" value="Search"/>
<a href="http://www.portal.state.pa.us/portal/server.pt/community/about_the_archives/3177/search_archives_finding_aids/429469"
style="font-size: 9px;color: #003399;height: 6px;text-decoration:
underline;padding: 0px;"><font face="Arial, Helvetica,
sans-serif">Advanced
Search</font></a>
</div>
</form>
Unfortunately, it was our
departed webmaster who dealt directly with Google. I'm not sure what sort
of indexing measures might have been taken at her or their end to get this all
up and running. I just dealt with the coding end of things. But I
could probably track her down and ask if need be.
Sincerely,
Sharon Nelson
Sharon Nelson
Digital Archives and Records Division
Pennsylvania Historical and Museum Commission
Happy Tuesday Everyone,
Just wondering if anyone has tried using Google Analytics with their
finding aids. I was thinking it would be easy enough to insert the
necessary code in the stylesheet template and then you'd would be able to get
some good data on finding aid use, as well as user browser/network/hardware
capabilities.
When I started my current position, I implemented Analytics on several
pages of our website. Our public finding aids are all HTML at the moment
and I didn't want to hand edit each individual document, so chose not to
implement Analytics in finding aids for the time being. We've recently
started an EAD project thought and this idea came back to me.
If you have implemented Google Analytics for your finding aids, I'd love
to hear about it!
Best,
Nathan