<!doctype html>
<html>

    <head>
        <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
        <link rel="import" href="../../paper-input/paper-input.html">
        <link rel="import" href="../../paper-button/paper-button.html">
        <link rel="import" href="../../paper-styles/demo-pages.html">
        <link rel="import" href="simple-tracker.html">

        <title>simple-tracker</title>
    </head>

    <body>
        <template is="dom-bind">
            <div class="vertical-section vertical-section-container centered">
                <simple-tracker id="tracker" account-id="[[accountId]]"></simple-tracker>

                <paper-input value="{{accountId}}" label="Account ID"></paper-input>
                <paper-button on-tap="_connect">Connect</paper-button>
                <paper-button on-tap="_trackPageView">Track URL</paper-button>
            </div>
        </template>

    	<script>
    		var scope = document.querySelector('template[is=dom-bind]');
    		scope._connect = function() {
    			scope.$.tracker.gaCreate(this.accountId);
    		};
            scope._trackPageView = function() {
                scope.$.tracker.gaTrackPageView("test/foo");
            }
    	</script>
    </body>

</html>

<!doctype html>
<html>

    <head>
        <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
        <link rel="import" href="../../paper-input/paper-input.html">
        <link rel="import" href="../../paper-button/paper-button.html">
        <link rel="import" href="../../paper-styles/demo-pages.html">
        <link rel="import" href="simple-tracker.html">

        <title>simple-tracker</title>
    </head>

    <body>
        <template is="dom-bind">
            <simple-tracker id="tracker" account-id="[[accountId]]"></simple-tracker>

            <div class="vertical-section vertical-section-container centered">
                <paper-input value="{{accountId}}" label="Account ID"></paper-input>
                <paper-button on-tap="_connect">Connect</paper-button>
            </div>

            <div class="vertical-section vertical-section-container centered">
                <paper-input value="{{page}}" label="Page URL"></paper-input>
                <paper-button on-tap="_trackPageView">Track URL</paper-button>
            </div>
        </template>

    	<script>
    		var scope = document.querySelector('template[is=dom-bind]');
            scope.page = 'test/index.html';
    		scope._connect = function() {
    			scope.$.tracker.gaCreate(this.accountId);
    		};
            scope._trackPageView = function() {
                scope.$.tracker.gaTrackPageView(scope.page);
            }
    	</script>
    </body>

</html>

Allow changing URL in demo
Allow changing URL in demo
