Section 1: Introduction to Visiopt Integration with Shopify
1.1 - Overview of Visiopt
Visiopt is a cutting-edge optimization and testing platform designed to enhance the performance of your Shopify store through advanced multivariate testing and comprehensive analytics. By integrating Visiopt with Shopify, you can conduct sophisticated experiments on your store's layout, design, and functionality to determine what drives the best results. This integration allows you to make data-driven decisions that improve customer engagement, increase conversion rates, and ultimately boost your revenue.
1.2 - Importance of Visiopt for Shopify
Integrating Visiopt with your Shopify store provides several critical benefits:
Enhanced Testing Capabilities:
Move beyond traditional A/B testing with Visiopt's advanced multivariate testing, enabling you to test multiple variables simultaneously.
Data-Driven Insights:
Gain deeper insights into customer behavior and preferences, allowing you to tailor your store to meet their needs more effectively.
Improved Conversion Rates:
By optimizing your store based on test results, you can significantly increase your conversion rates and sales.
Automated Optimization:
Visiopt automates the process of identifying the best-performing variations, saving you time and effort.
Seamless Integration:
Visiopt's integration with Shopify is designed to be straightforward and user-friendly, ensuring that you can start optimizing your store quickly.
1.3 - Prerequisites and Preparations
Shopify Account:
Login: Log in to your dashboard.
Admin Access: Verify that you have admin access to your Shopify store to install apps and customize themes.
3rd Party Apps: If you are using 3rd party apps like Thiio, Pagefly, Shogun or others be advised that your setup will be a bit different. This will be covered in this document.
By ensuring you have these prerequisites in place, you will be well-prepared to integrate Visiopt with your Shopify store and start optimizing your online business for better performance and higher conversions.
Section 2: Setting Up Visiopt Tracking
1.1 - Add Your Pages to Visiopt
2.2 - Preparing Your Shopify Pages
Before you can start tracking with Visiopt, it's essential to identify the pages you want to include in your funnel. Visiopt can track and test all Shopify pages, including:
Product Pages: Individual product listings.
Collection Pages: Groups of related products.
Thank you / Confirmation page
Custom Pages: Any other pages you want to track, such as landing pages or blog posts.
2.3 - Generating Visiopt Code
Step 1: Accessing Visiopt Dashboard
Click on the "Create New Funnel" button.
Enter the name of your funnel > Hit Create Funnel.
Step 3: Adding Pages to the Funnel
Click on the "Add Page" button within the funnel setup.
Enter the URL of the Shopify page you wish to add.. Make sure the URL is accurate to avoid tracking issues.
For dynamic pages such as the Thank you / Order Confirmation page you may have to place an order and grab the complete URL.
Enter one URL at a time and click the “Add The page Button”
Step 4: Generating the VisiSmart Script
After adding your pages to the funnel, a pop up box will appear.
Copy and paste your VisiSmart Code using the Copy To Clipboard Option.
Save the URL and Script carefully to a notepad for use in a few moments.
Important: Each URL will get its own unique tracking script. It is very important to place the proper script with the proper page.
Section 3: Adding VisiSmart Code to Shopify Pages
Adding VisiSmart Code to Product Pages
Please note: The below instructions demonstrate on product pages but follow the exact same steps for all page types. All Shopify Pages have templates.
Please note that due to Shopify Changes the easiest way to add VisiSmart Code is to add directly to the page templates. This is quick and easy.
3.1 - Creating and Customizing Templates
If your product template for the page you want to add is unique, meaning it is used for that one product only you can skip this step and refer to step 1a.
If the same product template is used across more than one product, which is common then you will want to follow these steps to create a “testing template”.
Step 1: Create a New Template if Needed:
Navigate to Online Store > Themes > Customize
At the top, select Home Page > Products > Create Template.
Step 2: Name the New Template and Select the Template to Clone:
Provide a name for the new template (e.g., Visiopt Product Testing Template).
Select an existing template to clone. Go to Online Store > Themes > Customize:
Select the Page from the dropdown clickCreate Template
Name your template and select on which template to be based on, hit Create Template:
Step 3: Add the VisiSmart Script to the New Template:
In the new template, add a Custom Liquid block if needed.
Paste the VisiSmart script into the Custom Liquid block:
NOTE: if shopify page builders are used, the same thing can be called “Custom HTML”:
Step 4: Save the Changes:
Click "Save" to finalize the new template.
Step 5: Use this template to Test
Now to test your product page simply change the product template to your new Testing Template which includes the proper VisiSmart code.
Step 6: Assign the New Template to Specific Products:
Navigate to Products > All Products.
Select the product you want to track and test.
In the product’s edit view, find the Theme Template section.
Select the new template you created from the dropdown menu.
Step 7: Save the Changes:
Click "Save" to apply the new template to the product.
Important: It is best to create a new product template for every product you want to test. This will avoid mistakes. If you are only tracking and running one product test at a time you could use the same exact product template each time but be careful because if you are tracking and/or testing more than one product at a time in Visiopt this will cause issues and errors. Also when a test is done be sure to revert to the original template used.
3.1 A - Adding Scripts to Product Page Templates:
If your product uses a unique template then there is no need to set up a new product template. You can follow the steps above and add VisiSmart code directly to the existing product template.
Follow the exact steps above in step 3.1 but do not create a new template. Instead use your product template.
Step 1: Add the VisiSmart Script to the New Template:
In your product template, add a Custom Liquid block if needed.
Paste the VisiSmart script into the Custom Liquid block:
NOTE: if shopify page builders are used, the same thing can be called “Custom HTML”:
Step 2: Save the Changes:
Click "Save" to finalize the new template.
3.2 - Adding VisiSmart Code to Shopify Thank You / Confirmation Pages
You should have the VisiSmart Code for your thank you page from a previous step.
Step 1: Opening VisiSmart Tracking Script Pop-Up:
Review your thank you page VisiSmart code.
Copy the unique visi_wid and visi_pid numbers.
Step 2: Modifying and Pasting the Tracking Pixel
Use this script here and modify it according to the instructions in the next steps:
You will need to copy the following two ID numbers (that are unique to your Shopify thank you page):
Paste the ID numbers to the pixel below. In the pixel below replace the red 111 with the visi_wid number from your VisiSmart script, also replace the blue 222 with the visi_pid number from your VisiSmart script.
analytics.subscribe("checkout_completed", (event) => {
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
} return "";
} var visi_wid=111;
var visi_pid=222;
var param_Email = '';
param_Email += 'site_id' + "="+ visi_wid ;
param_Email += '&page_id' + "= "+ visi_pid;
param_Email += '&_vt_sid' + "=" + getCookie('_kx_sid');
param_Email += '&visi_email' + "=" + event.data?.checkout?.email;
console.log(param_Email);
fetch("https://visiopt.com/client/c_email.gif?"+param_Email)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
});
Modifying the Pixel Script:
- Replace the placeholders marked in red and blue above, in the pixel script with the copied visi_wid and visi_pid numbers.
Accessing Shopify Settings:
- Log in to your Shopify admin panel.
- Navigate to Settings > Customer events.
Adding Custom Pixel:
- Click on "Add custom pixel".
- Paste the modified tracking pixel script.
- Click "Save" and then "Connect".
Congratulations all your VisiSmart Scripts have been added.
3.3 - Add Pages To Your Visiopt Funnel:
Go back to Visiopt. Funnel View.
Now you can select and add your pages to your funnel.
Section 4: Setting Up Shopify Webhook
4.1 - Creating Your Webhook In Visiopt
To set up a webhook you must first have a test or campaign set up.
Step 1: Set up your Webhook on the Settings page > Payment Processing and Carts > Shopify.
Step 2: Enter a name for your Webhook > Select funnel to apply the webhook to > Hit Save & generate wWebhook URL
Step 3: Additionaly, you can mark the webhook as subscription by clicking on the Show as a subscription checkbox > Select the desired Recurring duration
Step 4: To see the webhook stats in your test, on the test result page choose the webhooks option > Then select your webhook from the dropdown
Step 5: To see the webhook stats in your campaign, in step 3 of the campaign setup, set Webhook as the goal type > Then select your webhook from the dropdown
Step 4: Copy the webhook URL.
4.2 - Add Your Webhook To Shopify:
Step 1: Log in top Shopify, and click on the settings link in the bottom of the left sidebar
Step 2: Click on "Notifications"
Step 3: Click on the "Create webhook" button
Step 3: As Event, select the "Order Payment""Order Payment". Then paste in the URL copied from Visiopt, and hit "Save"
Section 5: Verifying the Integration
5.1 - Place A Test order
Note: You must have an active test or campaign.
Check Visiopt to ensure everything is recorded properly.
Section 6: - Troubleshooting Common Issues
6.1 - Troubleshooting
1. Pixel Not Tracking
Verify all scripts are placed properly in Shopify.
Pay close attention to the script ID’s to make sure you did not accidentally paste the wrong script.
Remember each script is unique so every page will have its own unique script.
Visit the pages in question. Right click and check source code. Search for Visiopt. Make sure the code is actually on the page and it is the c code.
2. Webhook Issues:
Ensure the webhook is set up correctly and the URL is accurate.
Be sure to give it time to update. Shopify can take between 10 to 30 minutes to send Visiopt the webhook.
Section 7: 3rd Party Apps
Some users use 3rd party page builders and checkout pages to connect with Visiopt.
Each Page Builder App is built differently and requires a slightly different set up.
Adding code to these builders is actually easier than to Shopify.
Please refer to the help documents here for additional assistance.
If you don’t see the app you use, don’t worry, we are here to help.
This detailed guide covers the steps necessary to add VisiSmart code to Shopify product pages using two methods, as well as the process for integrating the tracking pixel on thank you pages.