After adding the script tag to your website, the methods for creating the Augmented Reality experience will be available through the global
ar.attach method attaches an event listener to open the AR experience on mobile devices (e.g.: on a button click). It will automatically track button clicks for analytics purposes.
|element that will trigger AR|
|event that triggers AR|
|Option to resize 3D model on AR experience|
|When true, shows an image in full-screen view explaining how to place and manipulate a 3D object on AR before proceeding to the camera experience|
|Behavior to reproduce when AR experience is not available on device|
|When defined, alerts user with chosen string|
|When defined, opens a 3D viewer in a warning screen (|
|When defined, modifies fallback text on |
|Changes the tittle on fallback page|
|Changes the top text on fallback page|
|Changes the bottom text on fallback page|
|When defined, include a Call To Action inside the AR experience, such as an Add To Cart button|
|Call To Action button text|
|Call To Action function to handle the button click inside the AR experience|
alertMessage = 'Sentimos muito, mas infelizmente seu dispositivo não é compatível com a visualização em Realidade Aumentada'
When rendered, shows a full-screen panel explaining how to place and manipulate a 3D object, before proceeding to the AR experience.
|once||The instructions screen will render only on the user's first AR experience.|
|always||The instructions screen will render every time the user interacts with the button|
|never||The instructions screen will never render|
alertMessage message can be customized
Shows an image when the mobile device does not support the AR experience. If the instructions parameter is provided, the fallback is displayed only when you click on the attached button.
Currently only available on iOS Safari and Android WebXR
We recommend the CTA
text parameter to be short so that it won't overflow into the product name
Shows a call to action on the Augmented Reality experience, such as an Add To Cart button. The
onClick function provided will dispatch when the user interacts with the CTA.
The method returns a shareable URL for the AR experience.