@bernard_auth<EOL>async def postback_analytics(msg: BaseMessage, platform: Platform) -> Response:
try:<EOL><INDENT>pb = msg.get_layers()[<NUM_LIT:0>]<EOL>assert isinstance(pb, Postback)<EOL>user = msg.get_user()<EOL>user_lang = await user.get_locale()<EOL>user_id = user.id<EOL>if pb.payload['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>func = '<STR_LIT>'<EOL>path = pb.payload['<STR_LIT:path>']<EOL>title = pb.payload.get('<STR_LIT:title>', '<STR_LIT>')<EOL>args = [path, title, user_id, user_lang]<EOL><DEDENT>else:<EOL><INDENT>return json_response({<EOL>'<STR_LIT:status>': '<STR_LIT>',<EOL>'<STR_LIT:message>': f'<STR_LIT>'<EOL>f'<STR_LIT>',<EOL>})<EOL><DEDENT>async for p in providers():<EOL><INDENT>await getattr(p, func)(*args)<EOL><DEDENT><DEDENT>except (KeyError, IndexError, AssertionError, TypeError):<EOL><INDENT>return json_response({<EOL>'<STR_LIT:status>': '<STR_LIT>'<EOL>}, status=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>return json_response({<EOL>'<STR_LIT:status>': '<STR_LIT>',<EOL>})<EOL><DEDENT>
Makes a call to an analytics function.