Skip to content

Commit

Permalink
Merge pull request #5008 from GSA/more-global-report
Browse files Browse the repository at this point in the history
add more global reports
  • Loading branch information
FuhuXia authored Dec 9, 2024
2 parents 5fe129b + 42fc207 commit af08582
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions metrics/datagov_metrics/ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,57 @@ def setup_global_reports():
"orderBys": [{"metric": {"metricName": "activeUsers"}, "desc": True}],
}

global_reports["global__download_requests__last30"] = {
"dateRanges": date_range_last_month(),
"dimensions": [
{"name": "linkUrl"},
{"name": "fileExtension"},
{"name": "fileName"},
],
"dimensionFilter": {
"andGroup": {
"expressions": [
{
"filter": {
"fieldName": "eventName",
"stringFilter": {
"matchType": "EXACT",
"value": "file_download",
},
}
},
],
},
},
"metrics": [{"name": "eventCount"}],
"orderBys": [{"metric": {"metricName": "eventCount"}, "desc": True}],
}

global_reports["global__link_requests__last30"] = {
"dateRanges": date_range_last_month(),
"dimensions": [
{"name": "linkUrl"},
{"name": "customEvent:DATAGOV_dataset_organization"},
{"name": "customEvent:DATAGOV_dataset_publisher"},
{"name": "outbound"},
],
"dimensionFilter": {
"andGroup": {
"expressions": [
{
"filter": {
"fieldName": "outbound",
"stringFilter": {"matchType": "EXACT", "value": "true"},
}
},
],
},
},
"metrics": [{"name": "eventCount"}],
"orderBys": [{"metric": {"metricName": "eventCount"}, "desc": True}],
}


return global_reports


Expand Down

0 comments on commit af08582

Please sign in to comment.