"Assoc_Type" And Metrics Table OJS

Good day everyone,

I’m trying to make some custom reports using the “metrics” table as source and I have some doubts:

1.- I have noticed in “Assoc_Type” field the value 260 and I realized that it means PDF DOWNLOAD… Could you please let me know the meaning of the other values on this field?

The values are: 256, 257, 259, 260, 261 and 262.

2.- I want to know if in previous versions of OJS (I’m using 2.4.7-1) this table metrics captured the data just for downloads or as well for visits and consolidate those data in the same field on the table.

Thank you in advance.

Hi @William_Ortiz,

The assoc_type fields take on constants defined in PHP in classes/core/Application.inc.php and lib/pkp/classes/core/PKPApplication.inc.php in lines like this:

define('ASSOC_TYPE_ARTICLE', 0x0000101);

0x0000101 is hexadecimal notation, which corresponds to 257 in decimal. Not all ASSOC_TYPE_... constants are used in the metrics table, as you’ve already noticed; these are general purpose constants used in many parts of OJS.

Alec Smecher
Public Knowledge Project Team