Most online platforms like Shopify, BigCommerce, ClickFunnels, Teachable, Google Tag Manager, etc allow you to embed custom HTML and Script tags like Fomo.

However, if you use a tool like Kartra to run your online business, you may be unable to insert the Fomo script tag on your website, which looks like this:

<script type="text/javascript" src="https://load.fomo.com/api/v1/asdfasdfasdf/load.js" async></script> 

This is because some apps only allow custom "JavaScript" injection, whereas the Fomo snippet is an HTML tag.

We've created a simple workaround to fix this.

Step 1 - Get your Fomo Snippet

Inside Fomo, select a website then navigate to Settings > Embed.

Copy this snippet into a text file or Google Doc, wherever is fine. We'll need it in the next step.

Step 2 - Create a Javascript-only Fomo Snippet

Since you can't paste this tag directly into your app, instead take the following code:

var loadScript = function(location, callback){
  var fileRef = document.createElement('script');
  fileRef.setAttribute('type','text/javascript');
  fileRef.setAttribute('src', location);
  document.head.appendChild(fileRef);
};
loadScript("https://load.fomo.com/api/v1/XXXXXXX/load.js");

To make this work on your website, replace the "XXXXX" value on the last line (between "/v1/" and "/load.js") with the string of characters in your own Fomo script tag (Step 1).

Step 3 - Embed your new snippet

Inside your tool of choice (that does not allow HTML injection, only pure JavaScript), paste the entire snippet of code we created in Step 2.

Save your settings. Fomo will now work on your website without HTML injection functionality.

Email hello@fomo.com if you need any help with this embed process.

Did this answer your question?