Statistics for Shared Scripts

15 views
Skip to first unread message

russello...@gmail.com

unread,
Sep 16, 2017, 10:55:52 AM9/16/17
to Glowscript Users
Hello.

For Python scripts marked "Public" and shared, is there any way to gather statistics from Glowscript regarding visits, e.g., number of visitors, number of times viewed, copies made, etc.? Since the link created for shared scripts can be copied and pasted almost anywhere, an author has no idea who is using the script and the frequency of usage.

Thanks in advance.

Russell Osterlund


Bruce Sherwood

unread,
Sep 16, 2017, 1:32:40 PM9/16/17
to Glowscript Users
No, there's nothing like this available in the GlowScript environment. As for doing something like this in your own program, a severe problems is that, for security reasons, it is not in general possible to write data to a file from a JavaScript program, which is what VPython compiles to. GlowScript does have a read_local_file() function:


But there is no write_local_file() function, because this is not permitted in JavaScript. You don't want a web page to overwrite your hard drive while you're reading the page.

The only thing I can think of is this: If you know of an environment where you can do what you want, and you can run your own server, you could keep your program in a private folder, use "Share or export this program" to get the compiled version, and paste that into a web page that is served by your server and which tracks visitations to that web page.

Bruce

Rhett Allain

unread,
Sep 18, 2017, 3:01:23 PM9/18/17
to Glowscript Users
If you put your program on http://trinket.io, you can see some basic statics - like views.

Rhett
Reply all
Reply to author
Forward
0 new messages