> For the complete documentation index, see [llms.txt](https://docs.echo3d.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.echo3d.com/scene-viewer/add-code.md).

# Add Code

Learn how to add code to your Scene Viewer project.

Now that you are able to embed the Scene Viewer experience generated and hosted through the console, it's time to inject your own scripts into the webpage.

{% hint style="success" %}
Adding scripts into webAR experiences is only available in the [Custom](mailto:sales@echo3D.com) plan.
{% endhint %}

If you'd like to inject your own JavaScript scripts into the webpage, go back to the console and [add metadata](https://docs.echoar.xyz/web-console/manage-pages/data-page/how-to-add-data#adding-metadata) to add code to the experience. After adding metadata, [relaunch the experience](https://docs.echoar.xyz/scene-viewer/deploy-experience#launching-the-scene-viewer-app).

The following keys are words the system uses as pre-defined metadata keys to control built-in animations:

| Keyword         | Type   | Options                                                       | Description                                                                      |
| --------------- | ------ | ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| webarScript\<X> | string | Any string that represents a URL to a remote JavaScript file. | The remote URL of a JavaScript code file that will be injected into the webpage. |
| <p>webarOnClick |        |                                                               |                                                                                  |

</p><p></p><p></p> | string | Any string that matches a name of an existing function to be called upon click. The function must be followed by brackets `()`, either empty or with arguments. | Runs a specific function when clicking the webpage.                              |

For example:

| Key          | Value                                               |
| ------------ | --------------------------------------------------- |
| webScript1   | <https://code.jquery.com/jquery-3.5.0.js>           |
| webScript2   | <https://www.company.me/path-to-javascript-file.js> |
| webarOnClick | createCache()                                       |

Remember to [relaunch the experience](https://docs.echoar.xyz/scene-viewer/deploy-experience#launching-the-scene-viewer-app) after adding metadata with Scene Viewer experiences for the change to take effect.[<br>](https://docs.echoar.xyz/scene-viewer/deploy-experience)
