Users have a number of ways to embedded custom JavaScript code in a MyVR website, depending on what they are looking to do. Following are available options:
Embed a Site-Wide JavaScript Snippet
Common use cases would be analytics tracking code, a Facebook advertising pixel, or a retargeting code that should be served on every page of a website. Users can easily add custom JavaScript code to every page of a website directly from the "Additional Options" on a website. Instructions available here:
https://help.myvr.com/hc/en-us/articles/215294703
Embed a Page-Specific JavaScript Snippet
Similar to the above, all multiple property websites have the ability to embed custom JavaScript on a page by page basis. Specify a code snippet to include in the <head> or before the closing <body> tag. See instructions here:
https://myvr.zendesk.com/hc/en-us/articles/215294983
Embed a JavaScript Snippet Directly on the Page
Lastly, use the website builder to embed a custom snippet of code directly within a page. This allows users to place the JavaScript code anywhere, which is helpful if rendering content in a specific location.
To embed JavaScript inline on a page, pull up the website in a MyVR account and launch the advanced website editor for the page in question. Find the location on the page to include the custom JavaScript. Drag and drop in the HTML page component to this location. Copy and paste custom JavaScript code into the widget.
Comments