Tracking assets invocations can generally be generated as one of three types, which to choose is based on the site where the invocation should be implemented.
The default option, the tag consist of a HTML script-tag and can be placed in most parts of a normal HTML document. If you're unsure, use this option.
For use in an AMP (Accelerated Mobile Pages) environment, use the AMP pixel invocation that returns a tag that consist of the amp-pixel component, it works very much like the normal pixel invocation but in an AMP environment.
If you build a custom XHR solution to fire any of these tracking events, make sure the request include cookies. This is the default behaviour for fetch but get requests need to explicitly include cookies by adding withCredentials:true to the xhrFields-object.