This guide will use self closing tags (
<script />
instead of
<script></script>
) for simplicity. Most JSX and other modern compilers will
accept this syntax. However, if you are working in raw HTML, you
should manually close the tags.Add the Rev script
Learn how to add our script to your site.Using HTML
Using HTML
Add the following script to the
<head>
of your HTML file.page.html
Using JS
Using JS
Add the following code
index.js
You may also consider adding the
defer
attribute to the script tag to
optimize initial page load speed.(Advanced) A/B testing with the script
(Advanced) A/B testing with the script
If wanting to test with another monetization provider per client, you can use
the following code to conditionally load the Rev script.
index.js
Development
Add thedev
attribute to the script to use dev placements.
Using HTML
Using HTML
Add the following script to the
<head>
of your HTML file.page.html
Using JS
Using JS
Add the following code
index.js
Defining ad units
Add thedata-ad
attribute with the name of the placement to mark where you
want ads to appear.