Recommended: Synchronous Loading of Tracking Code

Why Synchronous Loading

With synchronous loading, when a page begins to load, the tag processing starts as soon as the JavaScript is loaded, and page loading pauses until the processing is complete. In other words, synchronous loading ensures that the tag processing begins when the JavaScript is loaded, which helps accurately measure data. The downside is that it may affect page load speed.

Optimizing Synchronous Loading for Page Load Speed

Ptengine's basic tag uses improvements, CDN, and proprietary algorithms to load within tens of milliseconds under normal network conditions, and within 500 milliseconds even when Experiences are published. Therefore, synchronous loading does not significantly impact the user experience.

  • Tag compression and caching Ptengine's tracking code reduces network bandwidth usage and download time to improve website performance.

  • Minimized code size By reducing code size, download time and bandwidth usage are decreased, improving website performance.

  • High-speed servers and CDN Using high-speed servers and CDN improves website response speed and reduces the impact of tags on page load speed.

  • 24/7 monitoring We use global node monitoring services and real-time observation of tag file download speeds to promptly detect network fluctuations.

Note: Ptengine's base code is hosted on AWS, a computing platform with world-class networking and storage. AWS has been recognized as a leader in cloud infrastructure and platform services for over 10 years. Based on historical data, it has achieved 100% uptime for 10 consecutive years.

Advantages of Synchronous Loading

The advantages of using synchronous loading are as follows: (*The following description assumes the basic tag is embedded in the HTML.)

  • Accurate data measurement Synchronous loading ensures that subsequent code only executes after the Ptengine tag is loaded. Therefore, the measured data is highly reliable and trustworthy.

  • Easy management and maintenance With synchronous loading, the Ptengine basic tag has high priority and will not be overwritten or blocked by other JavaScript code. Additionally, since it is directly embedded in the HTML, tag management and maintenance remain straightforward.

  • Compatible with all browsing environments Synchronous loading works on both desktop and mobile devices and is suitable for all websites. It also adapts to changes in various browser specifications.

In summary, synchronous tag loading improves data reliability and stability, simplifies tag management and maintenance, and supports measurement across all browsing environments.

Asynchronous Loading

Asynchronous loading means that the tag processing does not necessarily coincide with the JavaScript loading time, but runs as an independent process. Therefore, unlike synchronous loading, even if one code fails to load, it does not affect other code. Since it does not block the page from displaying and does not inconvenience the user, tag management tools like Google Tag Manager typically use asynchronous loading.

Disadvantages of Asynchronous Loading

The disadvantage of asynchronous loading is that processing timing is unstable and data may not be measured correctly. Additionally, if page edits are performed in Ptengine Experience, page flickering may occur, and the appropriate loading method must be chosen depending on the situation, increasing management complexity.

Ptengine's tracking code uses proprietary technology to avoid delayed loading issues by employing synchronous loading.

最終更新