

Ask HN: Best way to track usage of js widgets and buttons? - brandnewlow

My social news site has a widget and external voting buttons a la Digg and Reddit.<p>What's the best methods to track usage?  I want to know what sites they're appearing on and how many impressions they're getting there.  The number of referrals would be great as well, but I don't think this information is gettable since the links are created in js.<p>Two approaches I thought of, neither seems adequate:<p>1.  Both widgets and buttons make use of an iframe.  I could embed Google Analytics code in the framed page that gets called so I can track these "hits."  This seems like it might hurt performance on the sites that run the widget/buttons though.<p>2.  Track requests made in the php logs to the image files used in the buttons and the widget.  My issue with this is that I'd  much prefer to track usage via Google Analytics so I can more easily compare the data and explore it.<p>Suggestions?
======
dannyr
There are widget analytics services such as ClearSpring, Gigya, and Widgetbox.

