Web Component wrapper for Google Analytics using Polymer.
Maintained by Rob Dodson.
- Import Web Components' polyfill:
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.0.20130905/polymer.min.js"></script>- Import Custom Element:
<link rel="import" href="elements/g-analytics.html">- Start using it!
<g-analytics
account="UA-XXXXXXXX-1"
domain="localhost">
</g-analytics>| Attribute | Options | Default | Description |
|---|---|---|---|
account |
string | UA-XXXXXXXX-1 |
Your Google Analytics tracking code |
domain |
string | localhost |
Your website domain |
A localhost
domainwill put the element in debug mode so you can test it locally. See Google Analytics official documentation.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
- v0.1.0 October 09, 2013
- Initial commit