uqlibrary / uqlibrary-ga

former component for Google Analytics (polymer component)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uqlibrary-ga

Codeship Status for uqlibrary/uqlibrary-ga Dependency Status Dev Dependency Status

Web component for Google Analytics.

GA Usage

<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>

uqlibrary-gtm

Web component for Google Tag Manager

GTM Usage

<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>

Getting Started

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

Developing

  • 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 running bin/generate-gh-pages.sh.
  • The full property rundown can be viewed locally by running npm start.

Testing

Tests are run using the Web Component Tester:

npm test

About

former component for Google Analytics (polymer component)

License:MIT License


Languages

Language:HTML 90.7%Language:Shell 9.3%