Problem with "additional scripts" on checkout

Shopify Partner
1 0 1

I tried to add javascript to my checkout page in the "additional scripts" field, but it wouldn't work. Even 

console.log("Hello world");

wouldn't do anything. Anyone have any idea what the problem is?

Tourist
5 0 1

Hey Nick, did you ever get this to work? I'm having the same problem. I've heard some say the Additional Scripts box only works for Shopify Plus users. If that's the case then Shopify:  please remove the box from the admin settings.

0 Likes
Shopify Expert
96 4 8

@jimjams  @Nick_H    Shopify checkout additional script doesn't allow custom script 


you can see Official document  here- what you can do with addition script  https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/order-status-javasc...

Shopify Expert
622 32 128

You can add custom javascript to the "Additional scripts" box. You don't have to be on Plus. What you're missing is a <script> tag. The Additional scripts field takes HTML/Liquid, not just javascript, so you have to wrap your javascript in a <script> tag.

0 Likes
Shopify Expert
96 4 8

@gina-gregory  did try to  
<script> alert("Hello! I am an alert box!!");</script>

???

0 Likes
Shopify Expert
622 32 128

It works, but it's important to point out that the code in the "Additional scripts" field only gets added to the checkout thank you page. It's mostly intended to be a place to add conversion tracking code or a short bit of custom HTML/messaging.