OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



tracking users who are downloading articles

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

tracking users who are downloading articles

Postby ushasharma84 » Fri Nov 19, 2010 4:32 am

Hi
We want to track users country and biography who are downloading our article. Article download is possible only after one is signed in that journal. so can u give me some pointers regarding that to produce a report of users country and biography field included with downloading counter.Thanks in advance.Looking for a prompt reply.
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: tracking users who are downloading articles

Postby jmacgreg » Fri Nov 19, 2010 7:14 pm

Hi ushasharma84,

OJS doesn't currently support that kind of functionality, so for the time being you may want to look at using Google Analytics or Awstats or some similar application to comprehensively track site visitors. We are currently developing more comprehensive statistical report plugins, and tracking location will be a part of this work, but it may be a while before these new plugins are released.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: tracking users who are downloading articles

Postby ushasharma84 » Tue Nov 23, 2010 12:23 am

hi
I have enabled google analytics plugin. while creating google analytics account it gave me a code which i m pasting
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19859043-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

Now in google analytics plugin setting it is asking for a number and it has been written in the setting page that For new tracking code, the account number is displayed within the tracking code as: var pageTracker = _gat._getTracker("###"). but I cannot see this var pageTracker = _gat._getTracker in the tracking code I have pasted above.so I pated my Account Id that is ''UA-19859043' in account no. is it right? or do I need to change the settings. From where can I get this Account Id?
Thanks in advance.
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: tracking users who are downloading articles

Postby jmacgreg » Wed Nov 24, 2010 5:13 pm

Hi ushasharma84,

That should be right -- but of course, the best way to confirm this is to test it.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: tracking users who are downloading articles

Postby ushasharma84 » Thu Nov 25, 2010 12:42 am

hi
Thanks for the prompt reply.
I have tested it and it is working fine. Now as per my requirement for tracking users who are downloading pdfs, I Hvae searched the analytics and found there, that i need to add the following attribute onClick="javascript: pageTracker._trackPageview('/downloads/map'); for anchor tag of the pdf file which is being downloaded.i need to track pdf download of all articles not a single one. so I want to know where exactly i need to put this code to make it working.u can refer to article http://www.google.com/support/analytics ... swer=55529 to better understand the problem.
Thanks in advance
:roll:
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: tracking users who are downloading articles

Postby ushasharma84 » Thu Nov 25, 2010 4:53 am

hi
I searched google and found a java script code that tracks all downloaded files. I am attaching the code file with this. It has been written there that I need to place this file on all pages just above the Google Analytics tracking code.So I want to know where exactly i need to put it and should I use this code.
Thanks in advance.
:roll:
Attachments
gatag.js
(2.54 KiB) Downloaded 104 times
ushasharma84
 
Posts: 108
Joined: Wed Mar 31, 2010 11:58 pm
Location: delhi

Re: tracking users who are downloading articles

Postby jmacgreg » Sat Nov 27, 2010 4:32 pm

Hi ushasharma84,

You can modify the Google Analytics code by editing the correct tpl file in plugins/general/googleAnalytics -- either PageTagGa.tpl or PageTagUrchin.tpl, depending on which method you are using.

Cheers,
James
jmacgreg
 
Posts: 4186
Joined: Tue Feb 14, 2006 10:50 am

Re: tracking users who are downloading articles

Postby nevermind182004 » Fri Jan 28, 2011 1:52 am

hi! i would like to ask if you're able to track the downloaded files in ojs... i wish u could post here how u did it if ever.. thanks in advance!
nevermind182004
 
Posts: 86
Joined: Mon Apr 20, 2009 6:02 pm

Re: tracking users who are downloading articles

Postby jayfitzsimmons » Sat Feb 19, 2011 11:31 am

Hello,

I am having trouble enabling the Google Analytics plugin on my OJS site (version 2.2.4). I don't think this is a bug - it's just my own incompetence. Could someone please suggest what I should do?

WHAT I'VE DONE SO FAR:
I enabled the GA plugin as journal manager, and changed the settings to specify the account number. It is an urchin.js legacy tracking code based on the UA- prefix to my GA account number. On the Google Analytics website I modified the website profile settings appropriately (I think).

WHAT I HAVEN'T DONE BECAUSE I DON'T KNOW WHAT TO DO:
The GA website shows me some text it tells me to paste into my web files. But I don't know what file(s) to paste this information into. Based on some of the above posts in this forum, I'm assuming I should paste the information into plugins/general/googleAnalytics -- PageTagUrchin.tpl. But when I open that file I see the following information already there, so I don't know which part of it I should paste overtop of:

{**
* pageTagUrchin.tpl
*
* Copyright (c) 2003-2009 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Google Analytics urchin.js (legacy) page tag.
*
* $Id: pageTagUrchin.tpl,v 1.2.2.1 2009/04/08 19:43:16 asmecher Exp $
*}
<!-- Google Analytics -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "{$googleAnalyticsSiteId|escape}";
urchinTracker();
</script>
<!-- /Google Analytics -->

Thank you in advance to anyone who can suggest what I should do.
Jay
jayfitzsimmons
 
Posts: 78
Joined: Sun Aug 08, 2010 12:50 pm

Re: tracking users who are downloading articles

Postby michael » Sun Feb 20, 2011 9:56 am

Hi Jay,

There's no need to paste in anything. Simply enable the GA plugin in OJS and in the plugin settings, enter your GA account information. Please note that GA can take up to 24 hours before it will report that it's correctly tracking your site.

Cheers,
Michael
michael
 
Posts: 404
Joined: Thu Mar 29, 2007 2:09 pm

Re: tracking users who are downloading articles

Postby jayfitzsimmons » Mon Feb 21, 2011 5:49 pm

Thanks for the clarification Michael.

I found out why simply entering my Google Analytics account info into the Google Analytics Plugin Settings wasn't working for me. It's working now, so here's how I fixed it in case anyone else makes the same mistakes as me.

In the GA Plugin Settings, it seems I had entered two things wrong. Which is remarkable considering there's only one simple field. First, I entered only the numbers of my account number (e.g., 21433302-1); what I should have entered was the full account number with letters prefix (UA-21433302-1). Second, I selected "Legacy tracking code (urchin.js)" thinking that the UA prefix of my account somehow stood for urchin; what I should have selected was "New tracking code (ga.js)", which I figured out by editing my settings within the Google Analytics website and seeing the html code that had things like "ga.type", "ga.async" and "ga"-dot-other stuff ... I don't see any ga.js, but with all these other ga-dot-stuff I figured my account was probably New tracking code.

Between fixing the two of those mistakes my analytics seem to be working now. There is a pleasant green checkmark under "Status" now, instead of an error sign. I hope this helps anyone else who had problems like me. I'd suggest that in future OJS versions the example account numbers include letter prefixes if most accounts are like mine and have these letters, and the ga.js include some information that helps novice users figure out what kind of Google Analytics they're running.

Jay
jayfitzsimmons
 
Posts: 78
Joined: Sun Aug 08, 2010 12:50 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron