Learn how to add a code snippet to easily embed Dimensions assets using HTML and/or Javascript code.
The dimensions tag is a JS snippet that can be added to a page to easily embed Dimensions assets using HTML and/or Javascript code.
Follow these steps:
1. Include the script tag in your HTML:
<script src="https://dimensions-tag.cloudinary.com/all.js"></script>
2. Initialize the tag:
const d8sApi = initDimensions({
account: "<my-account>", //replace with your account ID
viewers: ["IMAGE", "VIDEO", "3D"],
});
3. Replace the account value with your account ID. You can copy the value from the Settings page.
4. The Viewers array tells which types of assets you’d like to include on the page. If you add “3D”, make sure also to include the Dimensions 3D Viewer script:
<script src="https://dimensions-3d-viewer.cloudinary.com/all.js"></script>
Comments