Javascript error
-
In footer there is a form for subscribe newsletter I excluded the javascript to load the form but form still is not showing
The page I need help with: [log in to see the link]
-
Hi @sanjeev08;
If you’re referring to the following code:
<script type="text/javascript"> var ss_form = {'account': 'MzawMDG3NDIwAQA', 'formID': 'MzRMTjI3N0jWTTU1N9M1STM21bVITEvRNTczTzI3MjBONLU0BQA'}; ss_form.width = '100%'; ss_form.height = '1000'; ss_form.domain = 'app-3QNKYHATA4.marketingautomation.services'; // ss_form.hidden = {'field_id': 'value'}; // Modify this for sending hidden variables, or overriding values // ss_form.target_id = 'target'; // Optional parameter: forms will be placed inside the element with the specified id // ss_form.polling = true; // Optional parameter: set to true ONLY if your page loads dynamically and the id needs to be polled continually. </script>There’s also another part of the newsletter script inside the <head> tag:
<script type="text/javascript" defer> var _ss = _ss || []; _ss.push(['_setDomain', 'https://koi-3QNKYHATA4.marketingautomation.services/net']); _ss.push(['_setAccount', 'KOI-46F8PMATZC']); _ss.push(['_trackPageView']); (function() { var ss = document.createElement('script'); ss.type = 'text/javascript'; ss.async = true; ss.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'koi-3QNKYHATA4.marketingautomation.services/client/ss.js?ver=2.4.0?defer'; var scr = document.getElementsByTagName('script')[0]; scr.parentNode.insertBefore(ss, scr); })(); jQuery(function($) { if($(window).width()>769){ $('.menubar__nav .menu-item').hover(function() { $(this).find('.menu-item').first().stop(true, true).delay(250).slideDown(); }, function() { $(this).find('.menu-item').first().stop(true, true).delay(100).slideUp(); }); $('.menubar__nav .menu-item > a').click(function(){ location.href = this.href; }); }});</script>What did you do to exclude the code? I’d choose
3QNKYHATA4.marketingautomation.servicesbecause this string exists in both scripts, thus can exclude both.-
This reply was modified 5 years, 9 months ago by
Optimocha.
I’m referring to newsletter script inside the head tag.
@sanjeev08 what did you enter to the JS exclude list?
url mentioned above
can you please give me an example how to exclude inline js
@sanjeev08 I actually did π In my initial response, I said:
What did you do to exclude the code? Iβd choose
3QNKYHATA4.marketingautomation.servicesbecause this string exists in both scripts, thus can exclude both.Removing those two URLs from the list and adding that string, which is inside both inline script tags, plus the script URL that comes after the second inlnie script, will exclude all three scripts (two inline, one URL) and allow you to display the newsletter widget. Can you try and let me know if it works?
thank you so much π
Glad that it’s working @sanjeev08! π If you have a minute, we’d love it if you gave us a fair review: https://wordpress.org/support/plugin/speed-booster-pack/reviews/#new-post
-
This reply was modified 5 years, 9 months ago by
The topic ‘Javascript error’ is closed to new replies.