Ecommerce Shopify WordPress Discussion

what is the way to show my scripttag to my shopify store?

I want to show an alert message to the customers that are landing on my shopify store. So I have written an endpoint to post a scripttag that is containing javascript code to show alert. Here is api endpoint:"/api/script/add/script_tags.json", async (req, res) => { let status = 200; let error = null; try { console.log('????????????script_taggggggggggggggggggggggggg',res.locals.shopify.session); const script_tag = new{session: res.locals.shopify.session}); script_tag.event = "onload"; script_tag.src = ""; await{ update: true, }); res.status(200).send(script_tag); } catch (e) { console.log(`Failed to add script tag: ${e.message}`); status = 500; error = e.message; res.status(200).send(e); } }); I have integrated this from my frontend. here it is: const response = await fetch("/api/themes/update/"+id, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ value: value }) } ); console.log(await response.json()); Here I can make sure that scripttag is adding successfully. Problem is it is not showing up to my store when I am viewing my store as a customer. As an add on: "" this file contains code: alert("Hello! Welcome to our shop.");
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.