Use Active Serve method in production
This is the recommended method to use MotaWord Active in production environment. It lets MotaWord serve your translations much faster and immediately reflects your configuration changes from your MotaWord dashboard.
Simply insert Active JS <script>
tag inside your <head>
tag.
<script src="https://serve.motaword.com/{your-unique-ID}.js"></script>
Recommendations for including <script>
tag
<script>
tag-
Put it inside
<head>
tag, as early as possible -
Add
crossorigin
attribute to the<script>
tag
<script src="https://serve.motaword.com/{your-unique-ID}.js" crossorigin></script>
- Use
async
<script src="https://serve.motaword.com/{your-unique-ID}.js" crossorigin async></script>
This way, Active JS will load asynchronously, as early as possible, and will start putting the translations as the DOM elements become available.
- Do not use
defer
in your<script>
tag as it delays translating the DOM and increases blink experience