top of page

Set Website Integration

Updated: Jan 31

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>

Related Posts

See All

HTML Tag Attributes

The tag searches for specific data attributes in your page’s HTML. 🖼️ Images Include an image in your website like this: <div...

Global Viewer Configurations

To globally set Viewer-related properties, you can add the following config to the Dimensions tag init: const d8sApi = initDimensions({...

Programmatic

Another way to include an image on the page is through the tag’s API. const d8sApi = initDimensions({ ... }); ...

Comments


Commenting has been turned off.
bottom of page