Integrating Optin Monster shortcode

Hi X!

We’d like to use Optin Monster on a few pages for a client’s site but we are struggling to implement their forms via shortcode/embed or even a shareable link which should be the most straight forward. For example, if you go here: https://app.monstercampaigns.com/c/dmyo1hvexypcp708g7cb/
the optin will appear but if we add that url to a Pro button it’s unclickable.

General WP editor: https://karenpryoracademy.com/optin-monster-test/
You can see that the Sharable Link and Embed work.

Pro:
https://karenpryoracademy.com/toilet/
We have the Shareable link added to the button (that’s just a text element + formatting) and it doesn’t appear/you are unable to click. If you login you’ll also see that the last section on the page is a combination of text elements and raw elements attempting to use Optin Monster codes.

Optin Monster support ends with Theme issues and we understand that this is a third party plugin but any insight to why something as simple as the shareable link doesn’t work would be immensely appreciated.

Thanks always!

Hi Paper+Screen,

Please consider that embedding a 3rd party plugin scripts are outside of our support scope and we can not implement the feature for you. We can give you the way it is correct to do but the implementation is on your shoulders.

You need to avoid adding the script tags to the content. You need to add it to the header section of the website. Please install a Child Theme and add the code below to functions.php file:

add_action('wp_head', 'head_information', 9999);

function head_information () { ?>
<script type="text/javascript" src="https://a.optmstr.com/app/js/api.min.js" data-campaign="dmyo1hvexypcp708g7cb" data-user="8675" async></script>
<?php }

The rest of the code can be added to the Raw Element in the content. Please consider that the case I added above is what I see in the optin monster test page on your installation.

Thank you.

Thank you for this! There’s potential. I added the code to the functions.php. However when you say, “the rest of the code can be added…” what do you mean by the rest of the code if I need to “avoid adding the scripts tags to the content”?

I’ve played around with adding various parts of the code below (as well as the shortcode and shareable link).

You can see it in a raw content box here: https://karenpryoracademy.com/toilet/

Thanks for your guidance!

Hey @INcroatia,

Maybe @christopher.amirian meant that you should not add JS that needs to go in the head to the builders. It should be added using the code above. Regarding “the rest of the code”, he means you should add JS code that needs to go to body could be added in the builder using the Raw Content element.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.