Adding Google event snippet to "thank you" -page

Hi,

That’s maybe something I thought myself. So, “if the page’s title is Thank you -add this event snippet to header”

In other pages the event snippet won’t show. Only that one page where the lead redirect after submit the contact form (contact form isn’t Shopify’s own..works better than original Shopify).