Pages

Tuesday 1 September 2015

Google Analytics View Selector

Documentation
Element for selecting the view ID (ids) value for queries inside a <google-analytics-dashboard> element.
Example
<google-analytics-dashboard>

  <google-analytics-view-selector></google-analytics-view-selector>

  <google-analytics-chart
    metrics="ga:sessions"
    dimensions="ga:date">
  </google-analytics-chart>

</google-analytics-dashboard>
Properties
account
Object
    The account attribute is the currently selected account.
    ids
    String notify
      The ids attribute, when found is used to preselect the chosen account, property, and view.
      See the Core Reporting API parameter reference for more details.
      property
      Object
        The property attribute is the currently selected property.
        setupReady
        Boolean
          True if setup is ready
          summaries
          Objectdefault:
            The summaries attribute contains an account summaries utility object with various helper methods for quickly getting account data.
            See the Github repo for more details.
            view
            Object
              The view attribute is the currently selected view.
              Methods
              accountChanged(newAccount, oldAccount)
              default:''
                fireChangeEvent()
                  Fire a change event passing all the currently stored data.
                  idsChanged(newIds, oldIds)
                  default:''
                    propertyChanged(newProperty, oldProperty)
                    default:''
                      setupReadyChanged(newVal, oldVal)
                      default:''
                        updateAccount()
                          The updateAccount method is bound to the change event on the account <select>. It updates the property and view <select>s based on the new account data. It also updates the ids attribute.
                          updateProperty()
                            The updateProperty method is bound to the change event on the property <select>. It updates the view <select> based on the new property data. It also updates the ids attribute.
                            updateView()
                              The updateView method is bound to the change event on the view<select>. It updates the ids attribute.
                              viewChanged(newView, oldView)
                                this.view = Path.get('views[0]').getValueFrom(newProperty);
                                Events
                                analytics-dashboard-control-change
                                1. query Object 
                                  The updated query params.
                                Fired when the users changes the view

                                No comments:

                                Post a Comment