Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

240
Vistas
shopify script tag api is created and loaded but code is not executing

I'm creating a shopify app but im facing some issues while working with script-tag api

I have created a script tag using this code:

    router.get("/scripts-tag/create",async (ctx)=>{
      ctx.body = await client.post({
        path: 'script_tags',
        data: {"script_tag":{"event":"onload","src":"https://xxxxx.ngrok.io/_next/static/chunks/pages/script-tag.js"}},
        type: DataType.JSON,
      });
    })

With this response:

  "body": {
    "script_tag": {
      "id": 173210206277,
      "src": "https://xxxxx.ngrok.io/_next/static/chunks/pages/script-tag.js",
      "event": "onload",
      "created_at": "2022-02-08T22:39:43+05:00",
      "updated_at": "2022-02-08T22:39:43+05:00",
      "display_scope": "all",
      "cache": false
    }
  },
  "headers": {}
}

script-tag.js:

import React from "react";

export default function scriptTag(){
    alert("hello")
}

i have also used this code before:

alert("hello world")

but the the real issue i'm facing is when i'm opening the store script is loaded in store

you can see in the above image that script is loaded in store page but the script code is not executed.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda