To integrate with Google Analytics (GA), VWO provides a one-click integration option. To do this, you must first add the analytics code to your website. This can be done either via Google Tag Manager or install the code directly. Post this, enable the appropriate integration option from the Integrate with Third-Party Products section present on the OTHERS page of your test creation process.
Once you are done with this, VWO automatically starts pushing your website data to GA. However, if you notice any issues or errors in the integration, these steps might help you troubleshoot the issue.
Check the Installation of Your GA Code
Check if the GA code on the page has been installed directly or via Google Tag Manager (GTM). To do this, follow this procedure.
Procedure
- Go to any browser and open developer tools.
- In the address bar of the browser, enter your website address.
- Go to the Network tab, and check for the analytics.js call.
NOTE: If you see this call, it means that the GA code is installed and got triggered on your website. - Corresponding to the analytics.js call, check the value of the Initiator column.
- If the initiator value contains gtm.js, then the GA code on your website is installed via GTM. Otherwise, the code is installed directly.
- If you are using the Classic Google Analytics Code, you must look out for the ga.js call instead of analytics.js. If the value of the initiator column corresponding to the ga.js call contains gtm.js, then the code on your website is installed via GTM. Otherwise, the code is installed directly.
- If you’re using the GA4 code, you must look for gtag in the search field, which should fetch a js call corresponding to the domain named www.googletagmanager.com. If the initiator value contains gtm.js, then the GA4 code on your website is installed via GTM. Otherwise, the code is installed directly.
Check If VWO is Pushing Data
Procedure
- Go to any browser and open developer tools.
- In the address bar of the browser, enter your website address.
- Go to the Network tab, and look out for the call starting with collect.
- As soon as you click on the collect network call, its corresponding information appears on the right.
- Go to the Header tab and look for the value of the cd1(custom dimension) field.
- If the cd1 field shows the value of CampId and varName, it means that VWO is successfully pushing data to Google Analytics.
To check if data is being successfully pushed for Custom Events integration, go to the Header tab, and check the values of the ea(event action) and el(event label) fields.