Javascript Oocharts-紧急求助

Javascript Oocharts-紧急求助,javascript,analytics,Javascript,Analytics,我正试图使用Oocharts API来显示我的谷歌分析数据,我一直在尝试的所有东西最终都显示在一个白色屏幕上。下面是我根据他们网站的示例使用的代码: <html> <head> </head> <body> <h3>With JS</h3> <div id='chart'></div> <h3>With HTML Attributes</h3>

我正试图使用Oocharts API来显示我的谷歌分析数据,我一直在尝试的所有东西最终都显示在一个白色屏幕上。下面是我根据他们网站的示例使用的代码:

<html>
<head>
</head>
<body>
    <h3>With JS</h3>
    <div id='chart'></div>

    <h3>With HTML Attributes</h3>
    <div data-oochart='bar' data-oochart-start-date='30d' data-oochart-metrics='ga:visits,Visits,ga:newVisits,New Visits' data-oochart-dimension='ga:continent' data-oochart-profile='ga:84157823'></div>

    <script src='../oocharts.js'></script>
    <script type="text/javascript">

        window.onload = function(){

            oo.setAPIKey("61a7a03dcab1487aa4ba3126f10e275f219d03c6");

            oo.load(function(){

                var bar = new oo.Bar("ga:84157823", "30d");

                bar.addMetric("ga:visits", "Visits");

                bar.addMetric("ga:newVisits", "New Visits");

                bar.setDimension("ga:continent");

                bar.draw('chart');

            });
        };

    </script>
</body>

用JS
具有HTML属性
window.onload=函数(){
oo.setAPIKey(“61a7a03dcab1487aa4ba3126f10e275f219d03c6”);
oo.load(函数(){
var bar=新oo.bar(“ga:84157823”,“30d”);
bar.addMetric(“ga:访问量”、“访问量”);
bar.addMetric(“ga:新访问”、“新访问”);
条形设置尺寸(“ga:大陆”);
条形图(“图表”);
});
};

在oo.setAPIKey()函数中,我尝试了Oocharts任务控制的API键和Google Analytics API键(因为我不太确定使用哪一个),结果都是相同的、空的


请告诉我我做错了什么,因为我快发疯了。提前感谢您……

任何可能感兴趣的人: 在oo.setAPIKey函数中,使用Oocharts任务控制提供的API密钥。 在oo.栏中,您只使用您的配置文件id的编号,而不是ga:然后使用编号。 当然是在酒吧里。画(‘图表’)你用‘酒吧’代替‘图表’


希望这能防止像我这样的人把头撞到墙上;)

你能添加你得到的错误报告吗?这将帮助人们回答你的问题。我没有任何错误。这是奇怪的部分。只是一个空白屏幕。。。