#1  
Old 03-29-2020, 03:20 PM
Ksteele's Avatar
Ksteele is offline
 
Join Date: Oct 2017
Posts: 11
Default

NoIndexSS.js Question


Hi There. I have been using Ecwid now for about 1.5 years and really like it. I do not use the starter site you provide. I instead use my own hosting with your script plugged into my index.html file. I dont even use a CMS, just a simple setup. Regardless, I have enabled long ago the NoIndexSS app so that my starter site is not indexed, and that seems to be working just fine. Here is my question though. I am trying to cleanup my GTMetrix/Google scores etc, and was wondering if I could host the noindexSS.js file on my own server locally? It looks like the code is:

Ecwid.isStarterSiteIdPresent = function(element, cls) {
return (document.querySelector(cls)) !== null;
}

Ecwid.checkAndAddMetaNoIndex = function(){
var body = document.getElementById("ecwid_body");
var ids = ['#ecwid-starter-site-links'];

var e = document.createElement('meta');
e.setAttribute('name','robots');
e.setAttribute('content','noindex, nofollow');
e.setAttribute('id','noIndexApp');

for(var i = 0; i < ids.length; i++) {
if(Ecwid.isStarterSiteIdPresent(body, ids[i]) && document.getElementById('noIndexApp') == null) {
document.getElementsByTagName('head')[0].appendChild(e);
}
}
}

setTimeout(Ecwid.checkAndAddMetaNoIndex,50);


Can I just add that js code to my server and host it locally and turn off the app in Ecwid? Would my site starter site still be removed from indexing as I do need it to be? Or will doing this create a problem? Thanks for any thoughts you can provide!
Reply With Quote
  #2  
Old 04-07-2020, 06:31 PM
Wendy's Avatar
Wendy Wendy is offline
Ecwid Team
 
Join Date: Jun 2014
Posts: 1,122
Default

Hello there,

This is Wendy from Ecwid team. Thanks a lot for getting in touch.

Yes, you can host the file with the script on your server. In order to connect this .js file to your Ecwid starter site, you can add a tag to your Ecwid Admin > Website page > “Header meta tags and site verification” section.

The tag will look like this:


HTML Code:
<script src="https://online-store.site/script.js"></script>
where https://online-store.site/script.js is a direct link to the .js file on your server.

Hope this helps. If you have any further questions, don't hesitate to ask!
__________________
Wendy
Ecwid Customer Care Team
Help Center


⬇ Please click Thanks if my reply helped you.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:27 PM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.