PyramidEmbedClient

The main embed client. This object manages the life cycle of the embed content on the host page.

Constructors

PyramidEmbedClient(host:string): pyramidEmbedClient

or

PyramidEmbedClient(host:string, username?:string, password?:string): pyramidEmbedClient
  • Use this to create an instance of the embed client object,
  • Host is the URL of the Pyramid instance. Required.
  • Injecting the username and password values can also authenticate the user at the same time. Optional.
  • The constructor cannot be called until the library has been loaded

Once instantiated, use the methods and properties below to create and manipulate embedded content.

Methods

  • init - initialize the embed client
  • login - authenticate the user against the host and automatically set the embed cookie
  • embed - embed content into the target HTML5 container
  • quickEmbed - simplified function to embed content together with embed client initialization and login
  • setAuthToken - manually set the authentication token into the embed cookie
  • getAuthToken - get the authentication token from the embed cookie

Properties

  • host - get the host address of the current embed client
  • isClientLoaded - gets the status of the embed client
  • isLoggedIn - gets whether the authentication cookie has been set

Example

The following instantiates a new embed client for the target instance of Pyramid

var client = new PyramidEmbedClient("https://analytics.pyramid.com");