All Collections
Advanced Features
Embedding Fomo in a Javascript-Only Environment
Embedding Fomo in a Javascript-Only Environment

Tutorial for website builder apps that don't allow HTML tag injections.

Ryan Kulp avatar
Written by Ryan Kulp
Updated over a week ago

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="" 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, navigate to Settings > Embed.

Copy to your clipboard the text between /api/v1/  and /load, it will be a string of digits and numbers. 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('src', location);

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 from 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 if you need any help with this embed process.

Did this answer your question?