I've worked through some of the examples on the aforementioned API page and can get a custom script included on every page on my test store except for the checkout page. I've changed the src to start with 'https://' as suggested by the tutorial but my script still doesn't run or even appear in the page source for the checkout.
Does anybody have any ideas how I can get this working for the checkout? Is what I'm trying to do even possible?
Cheers in advance,
Hi Tom, you cannot add scripts to the checkout process for security reasons associated with PCI compliance.
According to the API Docs... you can. Perhaps this needs a little clarification.
Note that a ScriptTag will only appear in checkout if the src starts with 'https://' in order not to break the SSL lock.
Yep, that's what I read in the API docs which is why I thought I should be able to do it. Could someone please clarify if a ScriptTag can or cannot appear 'in' the checkout?
This was previously beaten to death in the now defunct Google Groups... you can drop JS into the final page of checkout, known as the Thank You page. At that point, your script can do whatever you need to do. The completed order is present via Liquid there. You cannot drop script into the first two pages of checkout where other data is collected, as that would introduce serious security issues as you can imagine.
Arguably the docs are correct. The Thank You page is part of checkout.