r - Is there a way to decode the hex string in the Shopify order complete URL?
I'm running Matomo to get clickstream data from a Shopify ecommerce site and rather than going through the pain of getting ecommerce tracking working I'd like to extract the order-id from the thank-you URL. I can then join the clickstream data to ERP order details.
An example URL is:
d85e0fcf1a7e9e1c3c441c0777326775 is an actual order number.
I tried to do a standard hex decode, but the result was garbage.
Looks like the hash isn't standard encryption. It is however the
order_hash presented through the Shopify orders REST API. I ended up creating a private Shopify app and using the shopr R package (https://github.com/ben519/shopr) to get the order data which includes the
order_hash. The order hash can be extracted from the Matomo data URL as above and joined.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.