Core Methods Reference

This document provides a reference for the core Embed API methods as well as an overview of how those methods interact with Embed API components and the underlying Analytics client library.

Core Methods

The Embed API's core methods are the methods found on the object.


Queues a callback function to be invoked as soon as the Embed API library is fully loaded. Callbacks are invoked in the order they were added.

The ready function is defined by the Embed API snippet, so it can be used immediately. All other functions should be placed inside the ready callback to ensure the library is loaded before they're invoked.



Name Type Description
callback Function The function to be invoked as soon as the Embed API library is fully loaded.

Example {
  // Code in here will be invoked once the library fully loads.


Creates a component with the specified name and prototype methods. The created component will be stored on with the passed name.

The createCallback function should always be invoked inside a ready callback to ensure the Embed API client library is loaded.

Usage, prototypeMethods)


Name Type Description
name string The name of component.
prototypeMethods Object An object whose properties and methods will be stored on the component's prototype.

Example {'MyComponent', {
    foo: function() {
    bar: function() {

  var myComponentInstance = new;; // Alerts 'foo'.