Analytics question

Hello,

I have some doubts regarding some features of site statistics analysis. I have installed Google Analytics in the Omeka site in which I have been working (digital.museus.ul.pt) and I do get some detailed information about whats going on.

Though I would like to have some information about file access/download (image, video, 3D object, whatever) but I can't find that information. I can see if an item page has been accessed but I don't know if the file associated was clicked or downloaded.

Maybe the information is there and I can't find it or maybe the way analytics is installed.

Anyway, I would like to get information on that, any help on how to do it would be great.

Thanks.

Filipe

When an image or a document is clicked on from an item page, you go to another page that can be logged.

But, if you have audio and video files, those can be launched from the item/show page so a visitor (or most visitors)
doesn't need to download them to view them.

For more detailed info about how Google Analytics works, you'll have to dig into the Google Analytics resources, since they can explain what they track and the type of metrics they provide for site traffic.

There is an outdated plugin that was developed by outside developers to log downloads that you are more than welcome to grab and try to make work for your project.

This isn't a plugin that we support. You'd have to contact the individuals who built it to get some help: http://omeka.org/add-ons/plugins/1295/

Hi,

OK, thanks for the input. I have been reading something about this subject.

I have seen that to obtain download data I do have to use event tracking, something like:

<a href="”pdfs/my-file.pdf”">Download my file</a>

Though I am not sure how to apply this in Omeka, since I don't have just a plain HTML link, I think.

I believe it should be applied in the items/show.php. Probably here (but I am not sure how to apply the GA event handler in there):

<?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
    <?php echo files_for_item(array('imageSize' => 'fullsize')); ?>
    <?php endif; ?>

But can I do this in a way that automatically applies for all files and file types (image, video, etc.). Could I define the type in the event handler (ex.: PDF, JPG, AVI, etc.) automatically too? Maybe get it from the item metadata?

Unfortunatelly as you can see my PHP coding skills are very bad so I think doing a plugin is not going to work for me right now.

I was hopping that someone out there might have solved this and could point me in the right direction...
Tanks for any help!

All the best

Filipe

please ignore this...

OK, back to this, I was looking at the items/show.php and then at a page of an item, in the browser with firebug, and things looked different:

With firebug what I saw was:

<div id="primary">
<div class="item-file image-jpeg">
<a class="download-file" href="http://digital.museus.ul.pt/files/original/Peixes/MUHNAC-0001758-MB-IMG-web.JPG">
</div>

Which would be the place to insert the Google analytics event tracker:

<a href=”pdfs/my-file.pdf” target=”_blank” onclick=”_gaq.push(['_trackEvent','Download','PDF',this.href]);”>Download my file</a>

Which is very different from what I have in the items/show.php.

So how does this:

<?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
    <?php echo files_for_item(array('imageSize' => 'fullsize')); ?>
    <?php endif; ?>

tranlates into the HTML I see in the browser?

Thanks

Filipe

The files_for_item() function builds up the HTML for displaying the files. It uses a helper script in views/helpers/FileMarkup.php to figure out how to display different file types.

If I follow what you need to do, though, it might work best to use the file_markup filter by creating a small plugin. That will let you change the html that is produced for each file.

Hi Patrick,
Thanks for the help, I will look into that.

I am also looking at the documentation on the Plugins (http://omeka.readthedocs.org/en/latest/Tutorials/bestPracticesPlugins.html) to see if that something I can do with my basic programming skills...

Filipe

I added the tracking code to:
/omeka/themes/berlin/common/header.php

but stats do not show. Is there a preferred place?

I have Omeka 2.3.1 installed on a Linux host, which is hosting a few Omeka sites. Can someone please let me know where I can find the GoogleAnalytics plugin? I was not able to locate it for installation. I do have a Google Analytics account (tracking id). Thanks..newbie here.

I have Omeka 2.3.1 installed on a Linux host, which is hosting a few Omeka sites. Can someone please let me know where I can find the GoogleAnalytics plugin? I was not able to locate it for installation. I do have a Google Analytics account (tracking id). Thanks..newbie here.

Not sure if it exists any longer. I merely added the tracking code to the header.