Part One: Install Code on WooCommerce Shop
Integrating your WooCommerce shop with AutoOptimize allows you to create and run tests on your e-commerce store. The end-to-end process of integrating WooCommerce with AutoOptimize involves the following steps:
Note: Since WordPress/WooCommerce does not allow you to insert codes on specific pages, we recommend installing the free Header Footer Code Manager plugin.
*WARNING* Make sure to create a backup of your site before continuing.
1. Go to Plugins > Add New.
Search for "Header Footer Code Manager" and you will see the plugin appear by 99robots. Click Install Now then click Activate.
2. Once activated, go to HFCM from your left navigation bar. Then click Add New Snippet button.
3. Enter "AutoOptimize Code" in the Snippet Name field.
Select "Specific Post" from Site Display dropdown.
In the Post List field, select the product where you would like to A/B test.
Select "Header" from Location dropdown.
Select "Show on All Devices" from Device Display dropdown.
Select "Active" from Status dropdown.
Paste your project Experiment Script in the Snippet / Code box.
4. If you are using a Cache plugin on your WordPress/WooCommerce site, make sure to Clear/Delete Cache.
5. Once experiment setup is complete, you will be required to enter your thank you page url.
This URL will depend on what you are optimizing for. It could be the next step in your funnel such (e.g. Add to Cart), or a thank you page after visitor takes an action (e.g. purchases your product).
Select "is" if you know the exact thank you page url.
Select "contains" if you're not 100% sure of your thank you page url, but you're certain it has word(s) e.g. "thankyou".
To find the thank you page URL, complete a test order on your WooCommerce site. Once checkout process is complete, you're URL may look something like this:
In this case, we would suggest you select "contains" option and enter "checkout/order-receive".
You are all set up and ready to start running experiments to your WooCommerce Product page!