Skip to content
Panosphere 360°

How to embed a 360 virtual tour on a website

Published on · by

To embed a 360 virtual tour on a website, you copy its embed code (an <iframe> tag) and paste it into the page where the tour should appear. The tour then plays inside your page, like a YouTube video, with no app for your visitors to install.

Where you find the code depends on the type of tour: a Matterport 3D tour or a Google Street View tour published on Google Maps. Here are both methods, followed by how to paste the code into WordPress, Wix and other platforms.

Embedding a Matterport 3D tour

According to Matterport’s help center, it takes three steps:

  1. Make the tour viewable. In the space’s privacy settings, the tour must be viewable by the public.
  2. Copy the embed code. It looks like this, where YOUR_ID is your tour’s 11-character ID:
<iframe width="853" height="480" src="https://my.matterport.com/show/?m=YOUR_ID" frameborder="0" allowfullscreen allow="autoplay; fullscreen; web-share; xr-spatial-tracking;"></iframe>
  1. Paste it into your page where you want it.

Three settings make the difference:

  • A width of 100% instead of 853 pixels: the tour adapts to the width of the screen.
  • The allowfullscreen attribute: it lets visitors open the tour full screen on their phone, or in virtual reality.
  • The &play=1 parameter added to the address: on mobile, an embedded tour that has not been started opens in a new tab; with play=1, it starts inside the page, as long as the frame covers at least 60% of the phone’s screen.

To open the tour on a specific view (a room, a floor), Matterport provides a 25-character ID for each view, which replaces the tour’s ID in the same code.

Here is the result with the 3D tour of the Casino de Montréal, made for Loto-Québec:

This content is provided by Matterport; by clicking, you agree to load it.

Embedding a Google Street View tour

A tour published on Google Maps is also embedded with an <iframe> code, which Google provides directly:

  1. On a computer, open Google Maps and search for your business.
  2. Step into the indoor 360 tour and turn the view to the angle that should appear first on your website.
  3. Open the share menu (“Share or embed”), choose the “Embed a map” tab, then “Copy HTML”.
  4. Paste the code into your page.

Here is the result with the Google virtual tour of the Villa Massimo restaurant:

This content is provided by Google; by clicking, you agree to load it.

Publishing on Google Maps is limited to non-residential places: shops, offices and institutions. To learn more, see the Google virtual tour.

Pasting the code into your website

WordPress

In the block editor, add a “Custom HTML” block (type /html in a new paragraph), paste the code, check the preview and update the page. According to the WordPress documentation, accounts that are not allowed to add unfiltered HTML (contributors, for example) have the <iframe> tag removed when they save: embed the tour from an administrator or editor account.

Wix

According to Matterport’s help center, Wix embeds a tour from its address: add a site embed element, place it on the page, then paste the tour’s address.

Other platforms

Squarespace, Shopify and most content management systems have a code block or a “source” view (often the </> button) where you paste the <iframe> tag. Some platforms ask you to allow external HTML before the tour will display. If you don’t have access to your site’s code, simply send the code to your webmaster.

What to check after embedding

  • On a phone: does the tour display in full, or open in a new tab? Adjust the frame size or the play=1 parameter.
  • Page speed: the loading="lazy" attribute delays loading the tour until the visitor scrolls down to it.
  • Hosting: an archived Matterport tour shows an error instead of the model. It must stay hosted to remain online on your website.

Frequently asked questions

Do you have to pay to embed a virtual tour on your website?

The embed code itself is free: you just paste it. At Panosphere 360, the embed code, the share link and links to each room are included with every Matterport 3D tour. What you pay for is hosting the tour after the first year.

Can the same tour be embedded in several places?

Yes. The same code can be pasted on your website, on a listing page or in a blog; the same link works in your emails, on social media and in a QR code.

Can the tour carry your branding?

Yes. Virtual tour branding adds your logo, a menu and sections to the tour, which is embedded the same way.

Need a hand?

We deliver every tour with its embed code and links, and we can publish it on your website, your Google Business Profile and your listings. See web integration and distribution or request a quote.