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.
Javascript
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.
Pixel
In some environments it can be required to have the tracking asset fire without using Javascript. If the pixel invocation is used the tag consist of a plain HTML image-tag and can be placed anywhere in the body-tag of the HTML document.
AMP pixel
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.
XHR Request
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.
xhrFields:{
withCredentials: true
}
Comments
0 comments
Please sign in to leave a comment.