Monday, July 16, 2007

How to Implement Google Analytics in a CONTENTdm System

I recently received a question regarding how to add Google Analytics code to CONTENTdm system web pages in response to a Library Insider article I wrote in February 2007, “Discovering More Information about Your CONTENTdm Users by Using W3C Format or Google Analytics” (v. 5, no. 2, page 2). In response to that question, and for the benefit of others who may be interested to know, I will elaborate here.

The fundamental question is, “Where do I plug in the Google Analytic code?” If you are familiar with CONTENTdm, you know that there are many PHP pages in the system so determining where to insert the Google code can be a challenge.
The following CONTENTdm pages are ones that I selected for Analytics code to be inserted:
• item_viewer.php
• document.php
• meta_viewer.php
• viewer.php
• page_text.php(optional)
• side_side.php(optional)
• any entry pages you desire(Optional)

If you are interested to know why I chose these pages, keep on reading. The item_viewer.php is required for viewing non-compound objects. There are also other PHP pages called when item_viewer.php is displayed, although we do not need to worry about them because they are all rendered into a single page, item_viewer.php.

The next three pages, document.php, meta_viewer.php, and page_text.php, are required to view compound objects in CONTENTdm. One might ask, “Isn’t document.php enough?” The answer is “No.”

Inserting the Analytics code in only the document.php page will result in untracked hits when someone is viewing the item description, side description, side and text, side by side, next page, and previous page assets associated with a compound object. Document.php consists of three frames. Two of the frames are static and will not be tracked when users are navigating using the functions I mentioned above. If you want to track which compound objects and their corresponding metadata are used, meta_viewer.php and viewer.php also need to be registered with Google Analytics.

Page_text.php is used to display the page and text of a compound object. Side_side.php is used to display two compound objects side by side. If you would like Google Analytics to tell you how often these two functionalities are used, you should insert the Analytics code in these two pages. These two are optional because ultimately, these two pages will use viewer.php and meta_viewer.php to display contents. Now that you know where to insert your Analytics code, the hardest part is done. Let us move on to actually inserting the code.

On its Google Analytics how-to page is an explanation of how to insert the code in a dynamic PHP page by writing a PHP script that produces Javascript code. You do not need to follow this step. You can just follow the instruction for static pages, which is to insert the Google code right before the closing body tag. Once you have completed these steps, Google will begin providing you with incredible information about usage of your CONTENTdm system.

For more information, contact P. Budi Wibowo, Ball State University Libraries’ Head of Digital Libraries and Web Services,, (765) 285-8032

Labels: , ,


At 6:52 AM, Blogger Raf said...

would'nt it suffice to add the Analytics code to footer.php ? It's called whith every page....


At 10:00 AM, Anonymous Anonymous said...

miley cyrus nude [url=]miley cyrus nude[/url] miley cyrus sex tape [url=]miley cyrus sex tape[/url] miley cyrus nude [url=]miley cyrus nude[/url] miley cyrus nude [url=]miley cyrus nude[/url] kim kardashian nude [url=]kim kardashian nude[/url]

At 8:15 AM, Anonymous Anonymous said...

miley cyrus nude [url=]miley cyrus nude[/url] paris hilton nude [url=]paris hilton nude[/url] kim kardashian nude [url=]kim kardashian nude[/url] kim kardashian nude [url=]kim kardashian nude[/url]

At 4:00 PM, Anonymous generic viagra said...

hello guys...can not imagine how this excellent blog helped me for my research work performed...thanks a lot

At 12:50 PM, Anonymous Viagra said...

Very interesting! I enjoy reading about Google Analytics.

At 3:30 AM, Anonymous Anonymous said...

mobile dating site in united state speed dating in omaha ne

At 9:33 AM, Anonymous Anonymous said...

catholic singles online single catholic dating irishmen dating

At 5:30 AM, Anonymous Anonymous said... Soise [url=]make money at home[/url] phopherdepaxy ways to make extra money

At 12:37 AM, Anonymous Anonymous said...

back women dating asian men [url=]dating in morristown nj[/url] no dating only friends internet sites
looking for breastfeeding dating [url=]canadian singles dating[/url] dating and paypal
speed dating online paris [url=]sexy mature moment dating[/url] s m davis and dating

At 10:48 AM, Anonymous Anonymous said...

edward abbey free ebook the essential cosmic perspective ebook [url=]hamacher ebook[/url] theories of personality ebook pervin

At 3:47 PM, Anonymous Anonymous said...

Hello. And Bye. Thank you very much.

At 9:01 PM, Anonymous Anonymous said...

google software surplus computer software exchange [url=]maximo pacer piping inspection software[/url] particle filter software
[url=]Server Software - Software Store[/url] bodas software

At 10:07 PM, Anonymous Anonymous said...

suse linux amateur radio software adobe reader v 4.5 software download [url=]tally software downloads[/url] sign language freelance software scheduling progra
[url=]Office Tools - Software Store[/url] septic desing drafting software

At 12:03 AM, Anonymous Anonymous said...

Hello. And Bye. Thank you very much.

At 7:03 AM, Anonymous Anonymous said...

blackberry 7130c running blackberry pearl software genelink software support [url=]wedding plannng software[/url] blackberry bible software
[url=]USB Trace 2.0 - Software Store[/url] open source software file

At 1:57 AM, Anonymous Anonymous said...

gps mapping software for pocket zone labs software [url=]medical coding software boston[/url] gimpshop photo software download
[url=]NotePad Pro 3.6 - Software Store[/url] pacs templating software

At 5:06 AM, Anonymous Anonymous said...

team software project task management blender is the open-source software [url=]bin location software[/url] compu crane software
[url=]Ultra Mobile 3GP Video Converter 3.8 - Software Store[/url] menulink software problems

At 3:03 AM, Anonymous Anonymous said...

table tennis software optimise nottingham software [url=]wiki software free sql[/url] sewing data processing software
[url=]Music Software - Software Store[/url] garnica microsoft software

At 3:45 AM, Anonymous Anonymous said...

cvs pharmacy locations what is the best online pharmacy [url=]xopenex hfa pharmacy[/url]
pharmacy link help people pharmacy on line [url=]kamagra[/url]
caremark and pharmacy online pharmacy adderl [url=]kingwood pharmacy chattanooga[/url]
best choices peoples pharmacy mark bonfiglio and pharmacy [url=]stop smoking[/url]

At 9:37 PM, Anonymous Anonymous said...

pharmacy commack motor parkway new york midway pharmacy los angeles 87733 beverly boulevard [url=]cvs pharmacy mn[/url]
pharmacy order tramadol online pharmacy reductil 30mg [url=]casodex[/url]
wal mart pharmacy highway 124 snellville how to prepare for pharmacy certification [url=]pharmacy cv examples[/url]
pca pharmacy llc dominicks pharmacy locations in illinois [url=]prednisone[/url]

At 3:12 PM, Anonymous Anonymous said...

pharmacy law missouri defense cvs pharmacy mn [url=]granville pharmacy[/url]
canadian pharmacy reveiws glastonbury ct pharmacy [url=]weight loss[/url]
online buy cheap pharmacy free swiss pharmacy drug [url=]steroid pharmacy[/url]
novo fine syringes from pharmacy jackson memorial miami pharmacy residency [url=]digoxin[/url]

At 3:06 AM, Anonymous Anonymous said...

auroa pharmacy foreign online pharmacy [url=]online pharmacy order mexico[/url]
online pharmacy fed ex online discount pharmacy [url=]flonase[/url]
canada online pharmacy midwestern pharmacy [url=]pharmacy tecnition[/url]
techskills pharmacy tech program pharmacy order prescription [url=]kamasutra longlast condoms[/url]

At 10:13 PM, Anonymous Anonymous said...

It is Miuccia [url= ]шубу [/url] and Patrizio Bertelli who find the secret of Prada and invent the earliest black nylon Prada handbag in the world which opens the successful and beneficial door of famous handbag brand. Prada Handbags is famous for its lavish. Each lady wants a Prada handbag which presents the style and the way of life. Prada store sells cheap Prada, including Prada purses and Prada handbags. [url= ]меховые фабрики [/url] is the perfect method to buy a bag of high quality and finest designed. With the progression of Prada, increasingly more [url= ]шубы от производителя [/url] are established. Purchasing Prada handbags and Prada wallets in [url= ]фабрика меха [/url] could save you quite a few time and cash. [url= ]шубы от производителя [/url] is actually good option for you. [url= ]меховая фабрика [/url] would not disappoint you.

At 5:38 AM, Anonymous Anonymous said...

cool opening lines on dating sites fitness model dating
dating online personal [url=]bbw dating indiana[/url] free for women dating knoxville tn
christian dating for non virgens [url=]sean bean dating[/url] tom pelphrey stephanie gatschet dating [url=]smart1969[/url] mtv dating show next

At 4:34 PM, Anonymous Anonymous said...

bbw dating in milwaukee wi dating yen
rate reveiw dating site [url=]dating an emotionally abusive woman[/url] online dating sites for military
discrete adult dating affair [url=]is ambre lake still dating bret[/url] dating 12 step [url=]kerriwilliams1978[/url] nadal ivanovic dating

At 5:06 AM, Anonymous Anonymous said...

I will right away grab
your rss feed as I can not find your email subscription
link or e-newsletter service. Do you've any?
Kindly allow me recognize so that I could subscribe.

My web-site ... home equity vs mortgage :: ::


Post a Comment

<< Home