new UWA.Plugins.GoogleAnalytics(widget, options)
This Plugin add an Google Analytics tracker to your widget.
Examples
Using plugin in Widget Javascript:
<script type="text/javascript" src="http://cdn.uwa.preview.netvibes.com/lib/c/UWA/js/UWA_Plugins_GoogleAnalytics.js"></script>
<script type="text/javascript">
var MyPlugin = UWA.Plugins.GoogleAnalytics(widget, {
'_setAccount': 'UA-XXXX'
});
</script>
Using plugin in Widget Manifest:
<widget:plugins>
<widget:plugin name="GoogleAnalytics">
<widget:option name="_setAccount" value="UA-XXXX">
</widget:plugin>
</widget:plugins>
Or:
<widget:plugins>
<widget:plugin name="GoogleAnalytics">
<widget:options name="UA-XXXX">
<widget:option name="_setDomainName" value=".example.com" />
</widget:options>
</widget:plugin>
</widget:plugins>
Using Exposition Server application.ini config file:
exposition.widget.libraries.GoogleAnalytics = "UWA_Plugins_GoogleAnalytics.js";
exposition.widget.plugins.GoogleAnalytics._setAccount = "UA-XXXX";
Parameters
Name | Type | Description |
---|---|---|
widget |
Object | |
options |
Object | Options hash or a option/value pair. |