what drives this script

Solved
Highlighted
New Member
7 1 0

source problem page

https://shop.dermagevity.com/products/eyelastin

 

I have a script fragment that used to be an app which was removed. Shopify still thinks it is live, so runs it and gets a 404 on the called resource - tmpopup.js

 

<script>(function() {
  function asyncLoad() {
    var urls = ["https:\/\/d16x9pmufyvewt.cloudfront.net\/tmpopup.js?shop=dermagevity.myshopify.com","https:\/\/omnisrc.com\/inShop\/Embed\/shopify.js?shop=dermagevity.myshopify.com","https:\/\/www.stilyoapps.com\/reconvert\/assets\/js\/store_reconvert.js?shop=dermagevity.myshopify.com"];
    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);
  }
})();</script>

 It loads in the head section. I assume that shopify injects the code because the other two apps are in my app dashboard, and this script doesn't exist in my theme files.

 

Frankly I am sick of dealing with unresponsive app developers, and I reckon this is a shopify issue not an app dev issue anyway.

 

Any help appreciated in figuring this out

Thanks

Rick

0 Likes
Highlighted

Hi Rick,
Did you check the content of theme.liquid file?

Can you posted them here?

Richard | Front-end Dev @ PageFly
- Click 'Like' to let me know you like my answer!
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder whose goal is to empower anyone to build a perfect store.
0 Likes
Highlighted
New Member
7 1 0

Contents of Theme.liquid

 

<!doctype html>
<!--[if IE 9]> <html class="ie9 no-js{% if settings.box_layout %} is-boxed{% endif %}" lang="{{ shop.locale }}"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js{% if settings.box_layout %} is-boxed{% endif %}" lang="{{ shop.locale }}"> <!--<![endif]-->
<head>


<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="{{ canonical_url }}">

{%- if settings.favicon != blank -%}
<link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png">
{%- endif -%}

{%- if settings.favicon_retina != blank -%}
<link rel="apple-touch-icon-precomposed" href="{{ settings.favicon_retina | img_url: '152x152' }}" type="image/png">
{%- endif -%}

{%- capture seo_title -%}
{{- page_title -}}
{%- if current_tags -%}
{%- assign meta_tags = current_tags | join: ', ' %} &ndash; {{ 'general.meta.tags' | t: tags: meta_tags -}}
{%- endif -%}
{%- if current_page != 1 -%}
&nbsp;&ndash; {{ 'general.meta.page' | t: page: current_page }}
{%- endif -%}
{%- unless page_title contains shop.name -%}
&nbsp;&ndash; {{ shop.name }}
{%- endunless -%}
{%- endcapture -%}
<title>{{ seo_title }}</title>

{%- if page_description -%}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}

{%- include 'social-meta-tags' -%}
{%- include 'shopify-head-tag' -%}
{%- include 'weketing-tracking' -%}

{{ content_for_header }}

<!-- Google Tag Manager instal high in head-->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W6CG73R');</script>
<!-- End Google Tag Manager -->

<script type="application/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10074265'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq");</script>

<!-- luckyorange -->

<script type='text/javascript'>
window.__lo_site_id = 138325;

(function() {
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
wa.src='https://d10lpsik1i8c69.cloudfront.net/w.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(wa, s);
})();
</script>

<!--Lazy Loading -->
{{ "lazysizes.min.js" | asset_url | script_tag }}
<style>.lazyload,.lazyloading{opacity:0}.lazyloaded{opacity:1;transition:opacity.3s}</style>


</head>


{%- assign default_rtl_support = settings.rtl_support -%}
{%- assign default_catalog_mode = settings.catalog_mode -%}
{%- if settings.roar_themedemo -%}
{%- capture shop_demo -%}{% include 'querystring', name: 'type' %}{%- endcapture -%}
{%- if shop_demo == 'catalog-mode' -%}{% assign default_catalog_mode = true %}{%- endif -%}
{%- endif -%}
<body class="template-{{ template | split: '.' | first }}{% if default_rtl_support %} is-rtl{% endif %}{% if default_catalog_mode %} is-catalog_mode{% endif %}">

<!-- Google Tag Manager (noscript) paste immediatley after body tag -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W6CG73R"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<div id="site-loader"></div>
<div id="site-container">
{%- include 'global-symbols' -%}
{%- include 'age-check' -%}
{%- section 'header-mobile' -%}
{%- section 'header' -%}
{%- section 'header-menu' -%}
{%- section 'header-menu-vertical' -%}

<hr style="height: 2px; background-color: #1d96e8;">

<main class="site-main" role="main">
{{ content_for_layout }}
</main>

{%- section 'footer' -%}
{%- section 'copyright' -%}
</div>
{%- include 'theme-demo' -%}
{%- include 'photoswipe' -%}
<div id="weketing_google_translate_element" class="hide"></div>
</body>
</html>

 

 

0 Likes
Highlighted

Success.

New Member
7 1 0

Fixed it. Hired a dev.

0 Likes