I want to setup a Shopify Webhook on the Order Cancellation event that will cause some javascript code to be run.

In this specific case, I want to send a negative transaction to Google Analytics to remove the transaction when an order is cancelled (as described here: https://support.google.com/analytics/answer/1037443?hl=en )

I have my callback url / page setup (PHP) and it works correctly when loaded in a browser. But the webhook apparently (obviously?) does not trigger any client side code to run.

Any ideas on how I can make this happen?

有帮助吗?

解决方案

Although this does not solve the question specifically (of running javascript via a webhook) an alternative solution for this specific case would be to use Server Side Google Analytics tracking to send the negative transaction:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top