DSpace 8.1 + GA4: I can see the item event but not which documents were downloaded (only the total count)

6 views
Skip to first unread message

Rikchard

unread,
Sep 5, 2025, 11:03:41 AMSep 5
to DSpace Community

Hello everyone,

I am working on enabling bitstream download tracking in DSpace 8.1 with Google Analytics 4. I managed to get GA4 to count downloads (the item event shows up), but I cannot break them down by document/file: in the reports I only see the total number.

Environment / Current configuration

  • DSpace 8.1

  • GA4 already integrated (no GTM for downloads, to avoid double counting)

  • In local.cfg / dspace.cfg:

    google.analytics.key = G-XXXXXXX google.analytics.api-secret = <API_SECRET> google.analytics.cron = 0 0/5 * * * ? google-analytics.bundles = ORIGINAL
  • Services restarted.

  • Tested with downloads from bitstreams in the ORIGINAL bundle.

What I see

  • In Reports → Engagement → Events, the item event shows up with N events (e.g., 12).

  • In Explore (Free form) I tried creating custom dimensions to expose event parameters (e.g., event_label / label, event_action / action, event_category / category, document_path / document_title), but the table shows (not set) in those columns.

  • In DebugView I can see the item event arriving, but I cannot reliably identify which parameter contains the downloaded file/item name to use as a dimension.

Additional tests

  • Sent a test event through Measurement Protocol (with debug_mode) to check parameters:

    curl -X POST 'https://www.google-analytics.com/debug/mp/collect?measurement_id=G-XXXXXXX&api_secret=API_SECRET' \ -H 'Content-Type: application/json' \ -d '{ "client_id": "test-123", "events": [{ "name": "item", "params": { "category": "bitstream", "action": "download", "event_label": "TEST-dspace-file.pdf", "document_path": "/handle/TEST/0000", "debug_mode": 1 } }] }'

    (Validation succeeds, but I still cannot get a per-file breakdown in the standard reports.)

Questions

  1. What are the exact parameter names that DSpace 8.1 sends with the item event for downloads (document_path / document_title? label / event_label? others)?

  2. What is the recommended way in GA4 to list downloads by document/file (exact dimensions and filters in “Explore” or “Events”)?

  3. Do I need any additional configuration in dspace.cfg to include the bitstream filename (e.g., in label), or is registering custom dimensions enough?

  4. Is there any log or way to trace from DSpace the payload being sent to GA4 to confirm the actual parameters (besides DebugView)?

Any guidance or concrete examples (parameter names + a screenshot of an exploration) would be very helpful to resolve this.

Thanks in advance!

Best regards,


Rikchard

Reply all
Reply to author
Forward
0 new messages