My facebook pixel is sometimes firing multiple times for a single purchase, I think the reason behind it is that when a customer refreshes the thank you/ order confirmation page it sends another pixel event.
I found this https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/first-time-accessed where it gives me a script to enter to only run certain scripts on the first visit. However I am not sure what to replace this part of the script with:
// Conversion scripts you want to run only once
I know that needs to be replaced with the facebook pixel purchase event script but I am not sure where to find it/ what to put in. Any help would be appreciated.