Are you looking to add Google Optimize to your WordPress site? Google Optimize is a free Google tool that helps webmasters optimize their websites by running A / B split testing. This allows you to compare two versions of a page and see which version converts better.
In this article, HOSTVN will show you how to add it Google Optimize Visit the WordPress website easily.
What is Google Optimize?
Google Optimize is a free tool that allows you to split your pages and personalize them for your customers. You can link it to both Google Analytics and Google Tag Manager.
Use Google Optimize, you can set up an experiment to see if changing pages increases your conversion rate.
For example, you can run A / B split testing in which you have two versions of your sales page to see which version works better.
You may have a different title on each page or different product images on your online store. By split testing, you can gradually optimize your page for the highest conversion rate.
Google Optimize allows you to create these split tests using a drag and drop editor. It will display each variation to your visitors at random.
What will you need to use Google Optimize?
You need an account Google Analytics to use Google Optimize. You also need to set the tracking code Google Analytics on his website.
Step 1: Set up your Google Optimize account
First, you need to visit the site Google Optimize and click the button Begin.
You will be asked if you want to receive Google email. You need to click on the options you want, then click the button Next at the bottom of this screen.
Next you can choose specific settings for your account. We recommend just using the suggested settings.
After making your selection, click the button Completed to continue
Step 2: Link Google Optimize and Google Analytics
On the right side of your screen, you will see the option Link to Google Analytics. Click the arrow and click Link attributes.
On the next screen, select the website you want to link.
Once you have clicked on the Link, at the tab Work You will see your link
Step 3: Add Google Optimize to your WordPress website
To add the Google Optimize tracking code we will have two cases as follows
1. Use only Google Analytics
If you only use Google Analytics and using the tracking code Google Analytics then correct this code to look like below
<!– Google Analytics –>
(function(i,s,o,g,r,a,m){i('GoogleAnalyticsObject')=r;i(r)=i(r)||function(){ (i(r).q=i(r).q||()).push(arguments)},i(r).l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)(0);a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXXXX-1', 'auto'); ga('require', 'GTM-XXXXXXX'); ga('send', 'pageview');
<!– End Google Analytics –> |
Inside
- ga ('create', 'UA-XXXXXXXXXX-1', 'auto'); – The Google Analytics tracking code
- ga ('require', 'GTM-XXXXXXX'); – The Google Optimize tracking code
2. Use Google Tag Manager
If you are using Google Tag Manager code then please correct the code like the following
window.dataLayer = window.dataLayer || (); function gtag(){dataLayer.push(arguments);} gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXXX-1', { 'optimize_id': 'GTM-XXXXXXX'});
|
Inside
- 'Config', 'UA-XXXXXXXXXX-1' – The Google Analytics tracking code
- 'Optimize_id': 'GTM-XXXXXXX' – The Google Optimize tracking code
Note: These codes are usually inserted before the tags
Conclude
HOSTVN hopes this article helped you learn how to add Google Optimize to WordPress. If you have any comments you can leave a comment below. You may also want to see additional instructions for adding websites to Google Webmaster Tools and instructions for adding websites to Bing Webmaster Tools.
Source: wpbeginner