In this article, you’ll learn:
The first step to using VWO's features is to install the SmartCode on all the web pages where you plan to run your tests. The SmartCode allows your website to communicate with VWO servers. To learn about the working of VWO SmartCode, refer to How does VWO SmartCode Work.
Things to Consider While Configuring SmartCode
- If Iframe URLs are on the page, the VWO SmartCode should also be installed on the Iframe URL.
- If your website uses template-based headers and footers, add the code snippet in the header to implement it across the website.
- The SmartCode must be placed before the </head> tag of your website. Adding the code snippet in the head of a webpage helps execute the code faster and doesn't slow down the rest of your page from loading.
To learn how to install the VWO SmartCode on your website, follow these steps.
Ways to Add VWO SmartCode?
You can add VWO SmartCode in two ways- Automatically or Manually. To add it automatically, VWO provides third-party integrations. You need to download the VWO plug-ins for specific third-party platforms.
To learn more about integrating VWO with a third-party platform, refer to Extensions and Plugins in VWO SmartCode.
Adding VWO SmartCode Manually
After you have added the code to your website, the code does not change for any test. With the code in place, you can create as many website optimization tests as you want.
The default setting of Firefox and Safari browsers do not allow VWO’s SmartCode to execute in incognito mode. However, the default settings can be disabled using the following:
1. For tracking on the Safari browser, go to Preferences > Privacy and disable the Prevent cross-site tracking setting.
2. For tracking on the Firefox browser, go to Preferences > Privacy & Security > Custom and disable the following settings- Cookies and Tracking Content.
- Log in to your VWO account.
- Click the gear icon ⚙ on the top right, and go to SMARTCODE.
- Choose the type of SmartCode you want to work with.
- Copy the SmartCode.
- If you need to consult a developer to add code to your website, click Send to Developer to email the code snippet.
A dialog opens up having a pre-written email requesting to add the SmartCode to your website.
- To do it yourself, sign in to your website admin panel and paste the SmartCode snippet between the <head> and </head> tags of the page.
You should not install the VWO SmartCode using tag managers like Google Tag Manager. By default, all tag managers load VWO code asynchronously, which can cause page flicker on test pages. Often, with the use of tag managers, the VWO code may load with a delay, causing time-out issues and preventing visitors from becoming part of the test.