It could basically be anywhere in your source code. Personally I put it after the Hubspot tracking code. If you have added the Hubspot tracking code through a Custom HTML Tag in GTM (as explained here Install the HubSpot tracking code) you could basically just put it in the same tag as the Hubspot tracking code I suppose.