SmartCode is an automatically generated code snippet that you must add to enable VWO on your website. The SmartCode must be placed before the </head> tag of your website. To access the SmartCode in your VWO account, click the gear icon ⚙ on the top right, and go to the SMARTCODE section. This code snippet contains a unique Account ID that allows your website to interact with VWO servers. With this code, the VWO servers understand the changes you have implemented on your website and render the pages accordingly. Once this setup is done, the updated content is displayed to your website visitors.
Types of SmartCode in VWO
VWO provides support for two types of SmartCode that you can add to your website pages:
Synchronous code executes each function or statement in an HTML code sequentially. If the synchronous code fails to execute, it will block further execution of the code, thereby delaying the page load time. For example, consider that you have added VWO synchronous code in the head of your webpage’s HTML code and it fails to execute for some reason. In such a scenario, the web page will not load for your visitor. To learn more about synchronous SmartCode, refer to Synchronous SmartCode in VWO.
Unlike the Synchronous VWO code, Asynchronous VWO code loads in parallel to your webpage and does not affect the loading time of your website. VWO asynchronous code has a timer set for the pages to load and if a page fails to load within the set time, the execution stops, and the original website is displayed instead. To learn more about asynchronous SmartCode, refer to Asynchronous SmartCode in VWO.
To learn about how to add SmartCode to your website, refer to Configuring SmartCode for your Website.