How to Disable Google Webfonts

By default, OptinMonster will use Google Webfonts to style your campaign’s text. If you’re using custom fonts for your campaign or already load the Google Webfont on your site you can prevent OptinMonster from also loading these files.

Before You Start

Here are some things to know before you begin:

  • The code provided in this guide should be added directly to your website. They can be added to the head or footer of your site.

Disable All Fonts

To disable FontAwesome and Google Webfonts from being loaded on your site for your campaigns, add the following Javascript to your site:

<script type="text/javascript">
	document.addEventListener('om.Scripts.init', function(event) {
	event.detail.Scripts.enabled.fonts = false;
});
</script>

Disable Google Webfonts

To disable only Google Webfonts from being loaded on your site for your campaigns, add the following Javascript to your site:

<script type="text/javascript">
	document.addEventListener('om.Scripts.init', function(event) {
	event.detail.Scripts.enabled.fonts.googleFonts = false;
});
</script>

Disable FontAwesome

To disable only FontAwesome from being loaded on your site for your campaigns, add the following Javascript to your site:

<script type="text/javascript">
	document.addEventListener('om.Scripts.init', function(event) {
	event.detail.Scripts.enabled.fonts.fontAwesome = false;
});
</script>