Set API key with embed API google analytics -


i rending map google analytics data using embed api as:

      (function(w,d,s,g,js,fs){       g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(f){this.q.push(f);}};       js=d.createelement(s);fs=d.getelementsbytagname(s)[0];       js.src='https://apis.google.com/js/platform.js';       fs.parentnode.insertbefore(js,fs);js.onload=function(){g.load('analytics');};     }(window,document,'script'));      gapi.analytics.auth.authorize({        serverauth: {            access_token: 'my access token'          }     )};      var commonconfig2 = {        query: {            ids: 'ga:' + gaviewid,            metrics: 'ga:users',            dimensions: 'ga:region',            'max-results': 5,            sort : '-ga:users'            },            chart: {            type: 'geo',            container: 'timeline',            options: {               displaymode: 'markers',               width: '100%'             }         }     };      var datachart3 = new gapi.analytics.googlecharts.datachart(commonconfig2)           .set({query: daterange1})           .set({chart: {container: 'chart-3-container'}});  

map rendering fine. few days got error "google maps api error: missingkeymaperror" , map no longer rending. after googling came know google require api key access api. how can set api key existing code.

this took little emailing , forth team @ google.

it appears maps api has changed , requires send key access it.

the embedded api not designed allow send key assumed 1 not needed.

status: @ time no 1 working on embedded api , code not open source. maps in embedded api broken until further notice. google contact unable tell me when or if fixed in future.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -