1

I've got a greasemonkey script and I'd like to get an idea of how many regular users I have, what I'd really like is to use Google analytics inside the script. But I'm not sure how to do it if it's even posible.

Also, the site the GM script is running on also has Analytics so would this clash prevent me from doing it?

Ben Shelock
  • 20,154
  • 26
  • 92
  • 125
  • So what exactly are you trying to measure? Number of downloads? Number of pages they view in their browser? Specific pages they are viewing? Specific pages they view that trigger your script? Without more specific information about what you are trying to do it could be that you are asking how to infringe on their privacy. This has happened with a couple of other GM scripts and they were thoroughly reamed for their actions. Be careful. – Peter Rowell Feb 21 '10 at 20:14

1 Answers1

0

You can dynamically insert the Google Analytics Tracker with Dojo after the page has loaded http://ajaxian.com/archives/google-analytics-after-onload-and-documentwrite-for-xhtml but I don't think using analytics with userscripts is a good idea.

antimatter15
  • 1,436
  • 1
  • 12
  • 18