Web component for Google Analytics.
- Full documentation can be found at GitHub Pages.
<uqlibrary-ga tracking-id='UA-1234-5' website-url='http://www.test.com/app' app-name='TestApp' cookie-domain='test.com'></uqlibrary-ga>
Tracking id, website-url, app-name are set to be replaced at build time or as attributes to a required value. At build time use following tokens to replace:
<GA-TRACKING-ID>
<GA-WEBSITE-URL>
<GA-COOKIE-DOMAIN>
Web component for Google Tag Manager
<uqlibrary-gtm container-id='GTM-1234-5' app-name='TestApp'></uqlibrary-gtm>
Container id, app name are set to be replaced at build time or as attributes to a required value. At build time use following tokens to replace:
<GTM-CONTAINER-ID>
Please, note .bowerrc
installs dependencies to the parent directory of the git root. It's recommended to develop this component in a sub directory, eg .development/uqlibrary-ga-dev/uqlibrary-ga/
not to pollute your development directory with all bower dependencies.
Install Node.JS and run the following:
npm install -g bower web-component-tester polymer-cli
npm install
bower install
- Please adhere to the Polymer code style guide provided at Style Guide.
- GitHub pages should be updated after every commit to
polymer1.0
branch by runningbin/generate-gh-pages.sh
. - The full property rundown can be viewed locally by running
npm start
.
Tests are run using the Web Component Tester:
npm test