Skip to content
How it works Demo tour Pricing AR studio About News Help Contact
Start freeRequest a demo

Control an embedded tour from your site

Updated 14 November 20261 min read

A postMessage API: follow spaces, styles and choices, and open them from your own page.

When a tour is embedded on your own website, your page can follow what the visitor does and steer the tour: open a space or a style, set a client choice, open the dollhouse view or the quote form. It works with the standard browser postMessage, so no library is needed.

Embed the tour

Copy the embed code from Share (see Share link, QR code and embed) and give the iframe an id, for example id="tour".

Listen to the tour

window.addEventListener('message', function (e) {
  if (!e.data || !e.data.vrt) return;
  // e.data.vrt is 'ready', 'change', 'request', 'approved' or 'state'
  console.log(e.data);
});
EventWhenData
readyThe first space has loadedtitle, spaces (ids, titles, styles with prices), and the current space, style, picks
changeThe visitor switched space, style or a client choicespace, style, picks (a list of {slot, option})
requestA quote request was sentthe selections at that moment; never the visitor’s contact details
approvedThe design was approvedthe approved selections
stateYou asked for itspace, style, picks

Steer the tour

var tour = document.getElementById('tour').contentWindow;
tour.postMessage({ vrt: 'go', space: 'kitchen', style: 'modern' }, '*');
tour.postMessage({ vrt: 'option', slot: 'worktop', option: 'marble' }, '*');
tour.postMessage({ vrt: 'doll', on: true }, '*');
tour.postMessage({ vrt: 'quote' }, '*');
tour.postMessage({ vrt: 'play', on: true }, '*');
tour.postMessage({ vrt: 'state' }, '*');

Space, style, slot and option ids are in the ready event. Use them to build your own buttons next to the tour, sync a price summary on your page, or send the visitor’s choices to your analytics.

Privacy

Events carry only what is on screen. Names, emails and phone numbers that visitors type stay in vr-tecture and reach you through Requests.

Was this article helpful?

Still need help?

Send us your question or your model. A person on our team reads it and answers by email.

Saturday to Thursday, 9:00 to 16:00 Iran time (UTC+3:30).