Better analytics when api is used