I have website where after the user has made a successful payment they are returned to their account page with a 'flash message' - 'Transaction is completed successfully' displayed along the top. Is it possible to place a tracking pixel (for facebook and or google) in this flash message?

I hope this is clear and thanks in advance for any advice.