The following scripts can be used to install Content Glass button application or Content Glass E-commerce application on a website. 

 

Script for CG-Button App

<!-- set in HTML head -->
<!-- Put this script in the head section (can also be within body tag) -->
<script>
    /*
    * Environment settings
    */
    window.cg = {
    	draggableButton: true,
    };

    window.cgAsyncReady = function () {
    	CGAPI.loadApp({
        	type: "basic-app",
            manifest_script: "/app_manifest.js",
            manifest_dom_path: "cg.CGButtonAppManifest",
            document_root: cg.CG_HOST + "/apps/web/website_tools/button",
            container: "#content-glass-button-wrapper",
            draggable: true
        }, function onAppLoad(application) {
            //app was loaded and initialized.
        });
    };
</script>
<script id="cg-api" async type='text/javascript' src="https://api.contentglass.com/server_api/s1/application/load/cg_api?app_id=cg-button-general"></script>


<!-- Put this HTML markup where you want the button to show -->
<div id="content-glass-button-wrapper"></div>

Script for CG-Ecommerce App

<!-- set in HTML head -->
<!-- Put this script in the head section (can also be within body tag) -->
<script>
	window.cg = {
		draggableButton: true,
		SSE_DELAY:5000
	};
	window.cgAsyncReady = function () {
	CGAPI.loadApp({
		type: "basic-app",
		app_manifest: "/app_manifest.js",
		manifest_path: "window.cg.CGEcomButtonAppManifest",
		document_root: cg.CG_HOST + "/apps/web/website_tools/ecom_button",
		container: "#content-glass-ecom-wrapper"
	}, function onAppLoad(application) {
		//app was loaded and initialized.
	});
};
</script>
<script id="cg-api" async type='text/javascript' src="https://api.contentglass.com/server_api/s1/application/load/cg_api?app_id=cg-button-ecom"></script>

<!-- Put this HTML markup where you want the button to show -->
<div id="content-glass-ecom-wrapper"></div>