Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Embed API Demo window.google.load is not a function error

I'm following the tutorial here: https://developers.google.com/analytics/devguides/reporting/embed/v1/devguide

I'm sure I've added the Client Id and Javascript Origin correctly.

But the chart doesn't appear and I get this error:

Uncaught TypeError: window.google.load is not a function

It seems to appear every time I run the execute() function

Anyone else run into this problem?

like image 505
hewrin Avatar asked Apr 27 '15 09:04

hewrin


People also ask

What is the Google embed API?

The Embed API provides you with a chart component that is both a Google chart as well as a report object in one. This greatly simplifies the process for displaying data as the chart object will run your reports behind the scene and automatically update itself with the results.

When embedding Google Maps as a web object in a workbook?

When embedding google maps as a web object in workbooks, the following errors may occur:  The Google Maps Embed API must be used in an iframe When accessing a published version of the workbook, the below errors may occur:   www.google.com refused to connect Or

What are the error codes for Google APIs?

Google APIs must use the canonical error codes defined by google.rpc.Code . Individual APIs must avoid defining additional error codes, since developers are very unlikely to write logic to handle a large number of error codes.

What is the default error domain for Google API?

For Google APIs, the primary error domain is googleapis.com, and the corresponding error reasons are defined by google.api.ErrorReason enum. For more information, see the google.api.ErrorReason definition.


1 Answers

After much tossing and turning, I finally got the answer, all I had to do was add

    <script type="text/javascript" src="https://www.google.com/jsapi"></script>

to the application.html.erb file

like image 189
hewrin Avatar answered Oct 06 '22 10:10

hewrin