Website

Experiences created on the GMetri platform can be easily embedded within websites using the embed code generated after publishing the project.

  • Ensure that the "Public" option for your published project is turned on.
  • For linking, you can simply copy and insert the deployment URL in your website.
  • For embedding, you can copy the link for the deployment and embed it within an iframe in your website.
  • Add the required permissions to the iframe element as shown in the example below (replace src with your deployment link):

<div class="embed_iframe_container gmetri-embed-gmetri-test_don_jan" 
     style="width: 560px; height: 315px; position: relative; overflow: hidden;">

</div>
<script type="text/javascript" src="..." async>
</script>
Example code to show a GMETRI Experience as a fullscreen iframe: In index.html:

<html style="margin: 0; height: 100%; overflow: hidden">
<head>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> 
    <title>
    GMETRI | project-name
    </title>
</head>
  <body>
    <div class= "embed_iframe_container gmetri-embed-gmetri-project-name" 
         style="position: absolute; left: 0; right: 0; top: 0; bottom: 0"></div>
      <script type='text/javascript' src="..." async></script>
  </body>
</html>

Last update: