ScriptTag exists but not loaded by one specific store

Solved
nikolays
New Member
4 0 0

My scripttags are getting loaded by all stores, except one.

API resopnds that the scripttag do exist for this store.

But when looking in a browser console - the store not even requesting the script.

 

I've tried to recreate them multiple times, as well as adding other scripts. No result.

 

Any tips why this can happen?

 

Thank you

 

---

Update: I've found out that the shopify_domain redirected me to a non shopify-powered store. Quite surprising. That answers my question

0 Likes
vix
Shopify Staff
Shopify Staff
535 105 109

This is an accepted solution.

Its possible a redirect on the Shopify Store is at play - which would take you to the non-shopify domain. Glad its resolved. 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
Shrikant_Kale
Excursionist
28 0 4

Hi Shopify Staff.

 

I am also facing the same issue ScriptTag exists but not loaded by one specific store.

 

I am also putting the detail description below.

Issue:
I have created the script tag on Shopify store using the following Script Tag Apis "https://kushalsonline-com.myshopify.com/admin/api/2020-07/script_tags.json" but script is not loading  on the pages(say Homepage) of the website.
I have debug it I found that we are getting the blank urls array in the asyncLoad function.

More details are giving below.


Shop Name : https://kushalsonline-com.myshopify.com
Created Tag Details

Script Tag : {
"script_tags": [
{
"id": 145453777052,
"src": "https://cdn.izooto.com/scripts/dd0b2b3f649b22ccc1a09784d4a12fe7ca305739.js",
"event": "onload",
"created_at": "2020-12-22T17:21:42+05:30",
"updated_at": "2020-12-22T17:21:42+05:30",
"display_scope": "all"
}
]
};

Javascript code on Homepage "https://www.kushals.com/" of website.

Note: urls array is black. it should have this url "https://cdn.izooto.com/scripts/dd0b2b3f649b22ccc1a09784d4a12fe7ca305739.js"

(function() {
function asyncLoad() {
var urls = [];
for (var i = 0; i < urls.length; i++) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src=urls[i];
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}
};
if(window.attachEvent) {
window.attachEvent('onload', asyncLoad);
} else {
window.addEventListener('load', asyncLoad, false);
}
})();

 

 

 

 

 

 

0 Likes
zarmacharu
New Member
2 0 0

Could you tell me what you did to rectify this? I did not understand what you meant by "redirect to a non Shopify powered store".

Thank you in advance.

0 Likes