Chrome网上应用店中用户数量的API调用?

Ben*_*kes 8 api google-chrome google-chrome-extension chrome-web-store

我在Chrome网上应用店中有一个扩展程序,我喜欢通过"N个用户" 及其页面上的评分大致了解有多少人在使用它.

但是,我真的不喜欢加载整个"产品"页面只是为了看到几个数字而且我想我会尝试创建一个可以显示它的小部件.但是,我找不到Chrome网上应用店的任何API文档.

/webstore/api/v1/appid.json想要存在,但我在搜索中发现的最接近的事情只涉及Licensing API.

是否有针对用户指标的官方Chrome网上应用店API?

ser*_*erg 6

这不是这样的API.

您可以在扩展程序中使用Google Analytics来手动跟踪用户.

如果您不需要任何花哨的东西,只有许多安装和用户,有My Extensions扩展程序,它会为您跟踪这些数字.


flo*_*flo 5

将以下代码段复制并粘贴到以".php"扩展名保存的html文档正文中的任何位置.

<?php

//URL of your extension
$url = "https://chrome.google.com/webstore/detail/ddldimidiliclngjipajmjjiakhbcohn";

//Get the nb of users
$file_string = file_get_contents($url);
preg_match('#>([0-9,]*) users</#i', $file_string, $users);
$nbusers = str_replace(",", "",$users[1]);

echo $nbusers; //Display the number of users

?>
Run Code Online (Sandbox Code Playgroud)