Example of Shopping-Finish-Page form post (contacts + deals api)

deals
contacts

#1

Hi,

i wonder if someone has a full example in JavaScript for an online shop to transfer the data of a purchase.

Situation: We habe a finish page in our shop “thanks for your order”. For Google Analytics we have a piece of JS (placed on finish page) which transfers all data of the order to Google.

Does someone has such a standardized piece for us?
We need to transfer data like, hubspotCookie, prename, lastname, city, ordernumber and price.
Transfer should go to hubspot contacts + deals api

Kind regards, Yuri