Skip to main content
All CollectionsConsent Management SolutionConsent Management Solution FAQs
Why does Termly’s script need to be the first script on my page?
Why does Termly’s script need to be the first script on my page?
Updated over 2 months ago

To comply with data privacy regulations and ensure that the banner immediately asks for consent and handle the users’ choices appropriately before other third party scripts can execute, it is crucial to run Termly's script as the first script on your website.

Importance of Running Termly’s Script First

1. Compliance with Legal Regulations

GDPR and Other Privacy Laws: Regulations like the GDPR (General Data Protection Regulation) mandate that users give explicit consent before any personal data is collected or processed. Running Termly's script first ensures the consent banner is presented to users immediately, before any other scripts that might collect personal data are executed.

2. Preventing Unauthorized Data Collection

Blocking Cookies and Trackers: Ensuring Termly’s script runs first prevents other scripts from setting cookies or collecting data until user consent is obtained, which is essential for compliance and user privacy protection.

Control Over Third-Party Scripts: Many websites use third-party scripts for analytics, advertising, and other functionalities. By running Termly's script first, it can control and block these third-party scripts until consent is given.

3. Accurate Consent Management

Ensuring Proper Functionality: The consent management platform needs to initialize and load properly to manage user preferences and consent accurately. If other scripts run first, they might interfere with the initialization process, leading to incorrect consent management or failure to display the consent banner.

4. Improved User Experience

Immediate User Interaction: Displaying the consent banner as the first action ensures users are immediately aware of their choices regarding data privacy. This transparency can improve trust and provide a better user experience.

Avoiding Content Blockage: If other scripts load content or functionalities that later need to be blocked or adjusted based on user consent, it can result in a disjointed or broken user experience. Running the Termly script first helps to avoid these issues.

Did this answer your question?