0

I'm editing a client's site and I need to add custom javascript for our purchase tracking, on a success or thank you page.

Oh shopify we put it on the checkout input box custom script input window with a first_time_accessed variable so it doesn't get called twice. I figure this is a common request, but I couldn't find out how on searches.

I have access to the admin console, I'm new to Magento2, are there custom files I must access. I've mostly been going through the admin->content options

  • Is the JS external and you just need to load the URL or do you need to add a block of JS? – Ben Crook May 16 at 16:26
  • I need to make a block of JS. I have the main script loaded in the header section, so I believe it will still be there on the success page. So I basically just call a function from that, so I at least need a few lines of js. On shopify I check that it's the first load and pass the order amount and maybe orderID to my script which then records it in my server – Dan Parker May 16 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.