From 5fcef45d221c7d8d0571691445e1d04c8efd10cd Mon Sep 17 00:00:00 2001 From: utku-ozturk Date: Tue, 12 Sep 2023 19:12:50 +0300 Subject: [PATCH] top_files_downloaded post process update --- chalicelib_fourfront/checks/helpers/google_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chalicelib_fourfront/checks/helpers/google_utils.py b/chalicelib_fourfront/checks/helpers/google_utils.py index ad67b34a..c52c2a33 100644 --- a/chalicelib_fourfront/checks/helpers/google_utils.py +++ b/chalicelib_fourfront/checks/helpers/google_utils.py @@ -237,6 +237,7 @@ def post_process_report_items(report_key_name, report_items): file_item_type = r_item['customEvent:file_classification'].split('/', 2)[1] str_file_item_type = re.findall(r'[A-Z](?:[a-z]+|[A-Z]*(?=[A-Z]|$))', file_item_type) r_item['ga:productSku'] = '/{}s-{}/{}/'.format(str_file_item_type[0].lower(), str_file_item_type[1].lower(), r_item['ga:productName'].split('.')[0]) + r_item['ga:productCategoryLevel2'] = file_item_type del r_item['customEvent:file_classification'] elif report_key_name == 'views_by_file': for r_item in report_items: