2 Replies Latest reply on Jan 28, 2014 11:25 AM by erkjones

    How can I see metrics for downloading a doc attachment?

    erkjones

      I am using the jivedw_ tables. Using indirect objects in the activity_fact table, I can see stats for uploaded docs, but how can I see how many times an attachment on a doc (as opposed to an uploaded file) was downloaded?

       

      Thanks!

        • Re: How can I see metrics for downloading a doc attachment?
          RyanSe

          select jivedw_activity_fact.day_id,

              jivedw_activity_fact.direct_object_type,

              jivedw_activity_fact.direct_dw_object_id,

              jivedw_object.name,

              jivedw_activity_fact.indirect_dw_object_id,

              jivedw_object.object_id,

              jivedw_object.object_type,

              jivedw_activity_fact.activity_ts,

              jivedw_activity_fact.activity_type,

              jivedw_user.user_id,

              jivedw_user.username,

              jivedw_day.year as "Year",

              jivedw_day.month_of_year as "Month",

              jivedw_day.day_of_month as "Day",

              jivedw_day.week_of_year as "Week"

          from jivedw_activity_fact

          left join jivedw_object on jivedw_object.dw_object_id = jivedw_activity_fact.indirect_dw_object_id

          left join jivedw_user on jivedw_user.user_id = jivedw_activity_fact.user_id

          left join jivedw_day on jivedw_day.day_id = jivedw_activity_fact.day_id

          where jivedw_activity_fact.direct_object_type = 13 and jivedw_activity_fact.indirect_object_type = 102 and jivedw_activity_fact.activity_type = 320 and jivedw_object.name not like 'CONTENT'

           

          I found a query in my folders called "Analytics - Downloaded Attachments Reporting" but another one with "uploaded docs" listed as well so I think this is the right version.

           

          Code is a bit sloppy but the important parts are down in the where statement:

           

          • direct_object_type = 13 (attachment)
          • indirect_object_type = 102 (document, in other words, what is it attached to)
          • activity_type = 320 (Download)

           

          Try downloading an attachment then validating that it shows the transaction under your name to confirm.