Website JS Tracking Integration
*Suggested brands use API Tracking Integrationd. When there are major feature iterations, JavaScript integration may require version compatibility.
The JavaScript pixel is a script that is inserted into the global HTML element of your website and executed on each page. The saveTrackingId function is placed in the HTML element of every page of your website. It automatically captures and stores the lbid as a first-party cookie. The submit function is a small JavaScript pixel placed in the HTML element of your website's confirmation page, dynamically populated with customer identifiers and order information, and then sent to Linkbest. The JavaScript pixel needs to be loaded globally on your website before calling other functions. These functions should be prioritized as much as possible before loading your website to improve tracking accuracy.
Obtain JavaScript pixel
To obtain the JavaScript pixel, you need to first coordinate with the business team and provide them with your website address.
Integration JavaScript pixel
Place this JavaScript pixel within the global <head></head> HTML element of your site:
<script type="text/javascript" src='https://static.linkbest.com/xxxxxxx.js'>
</script>
Add your modified "saveTrackingId" code snippet at the top of the HTML element of each page on your website:
<script type="text/javascript">
linkbest('saveTrackingId');
</script>
Add your modified 'submit' code snippet at the top of the HTML element of the order confirmation page of your site:
<script type="text/javascript">
linkbest('submit', {
OrderID:'xxxx'
...
...
...
}:
</script>