g2o optimize_如何在WordPress中添加Google Optimize(2种简单方法)

g2o optimize

Are you looking to add Google Optimize on your WordPress site?

您是否要在WordPress网站上添加Google Optimize?

Google Optimize is a free tool by Google that helps website owners optimize their sites by running A/B split tests. This allows you to compare two versions of a page and see which one converts better (i.e is more successful).

Google Optimize是Google提供的免费工具,可通过运行A / B拆分测试帮助网站所有者优化其网站。 这使您可以比较页面的两个版本,并查看哪个版本转换得更好(即更成功)。

In this article, we’ll show you how to easily add Google Optimize in WordPress, so you can start running split tests.

在本文中,我们将向您展示如何轻松地在WordPress中添加Google Optimize,以便您可以开始运行拆分测试。

How to add Google Optimize in WordPress
什么是Google Optimize? (What is Google Optimize?)

Google Optimize is a free tool that lets you split test your pages and personalize them for your customers. You can link it to both Google Analytics and Google Tag Manager.

Google Optimize是免费的工具,可让您拆分测试页面并为客户个性化它们。 您可以将其链接到Google Analytics(分析)和Google跟踪代码管理器。

Using Google Optimize, you can set up experiments to see if making changes to a page increases your conversion rate.

使用Google Optimize,您可以设置实验以查看对页面进行的更改是否会提高您的转化率。

For instance, you might run an A/B split test where you have two versions of a sales page to see which one performs better.

例如,您可以运行A / B拆分测试 ,其中有两个版本的销售页面,以查看哪个版本的效果更好。

You might have a different headline on each page or a different product image on your online store. By split testing, you can gradually optimize your page to get the highest conversion rate.

您可能在每个页面上使用不同的标题,或者在在线商店中使用不同的产品图片。 通过拆分测试,您可以逐步优化页面以获得最高的转化率。

Google Optimize lets you create these split-tests with a drag & drop editor. After that it shows each variation to your visitors at random, so you can gather data about what works best.

Google Optimize允许您使用拖放编辑器创建这些拆分测试。 之后,它会向访问者随机显示每个变体,因此您可以收集最有效的数据。

您需要使用Google Optimize吗? (What Will You Need to Use Google Optimize?)

You need a Google Analytics account in order to use Google Optimize on your WordPress site. You’ll also need to have placed the Google Analytics tracking code on your site.

您需要一个Google Analytics(分析)帐户才能在WordPress网站上使用Google Optimize。 您还需要将Google Analytics(分析)跟踪代码放置在您的网站上。

If you don’t already have an account, or if you haven’t put the tracking code on your site, then see our guide on how to install Google Analytics in WordPress for step by step instructions.

如果您还没有帐户,或者尚未在网站上放置跟踪代码,请参阅有关如何在WordPress中安装Google Analytics(分析)的指南, 获取逐步说明。

You’ll also need MonsterInsights, which is the best Google Analytics plugin for WordPress.

您还需要MonsterInsights ,这是适用于WordPress的最佳Google Analytics(分析)插件。

It comes with a Google Optimize addon which makes it super easy to run Google Optimize tests on your website.

它带有一个Google Optimize插件,使在您的网站上运行Google Optimize测试变得非常容易。

MonsterInsights is a paid plugin, and you’ll need their Pro plan to access the Google Optimize addon. If you don’t want to purchase MonsterInsights, then we also have a method on how to setup Google Optimize manually using a free plugin as well.

MonsterInsights是一个付费插件,您需要他们的Pro计划才能访问Google Optimize插件。 如果您不想购买MonsterInsights,那么我们也提供了一种方法,该方法还涉及如何使用免费插件手动设置Google Optimize。

That being said, let’s see how to add Google Optimize in WordPress like a pro.

话虽这么说,让我们看看如何像专业人士一样在WordPress中添加Google Optimize。

设置您的Google Optimize帐户 (Setting Up Your Google Optimize Account)

First, you need to go to the Google Optimize website and click on the Get Started button.

首先,您需要访问Google Optimize网站并单击“入门”按钮。

The Welcome page for Google Optimize, with Get Started button

You’ll be prompted to decide whether or not you want to receive Google’s emails. After that, you need to click the options you want, and then click the Next button at the bottom of this screen.

系统将提示您确定是否要接收Google的电子邮件。 之后,您需要单击所需的选项,然后单击此屏幕底部的下一步按钮。

Choose which emails you want to receive from Google

You can now choose specific settings for your account. We suggest simply using the Recommended settings.

现在,您可以为帐户选择特定设置。 我们建议您仅使用“推荐”设置。

Make sure you select your country from the dropdown menu, so you can see the correct terms of service agreement. When you click on these to read them, they’ll open in a new tab, so you won’t lose your place during setup.

确保从下拉菜单中选择您所在的国家/地区,这样您才能看到正确的服务协议条款。 当您单击这些以阅读它们时,它们将在新标签页中打开,因此您在设置过程中不会失去自己的位置。

The checkboxes may also change depending on what country you select.

根据您选择的国家/地区,复选框也可能会更改。

Choose your Google Optimize account settings

Next, you need to check the boxes once you’re ready, and then the Finished button will turn blue. Click on it, then Google will set up your Google Optimize account.

接下来,您需要在准备好之后选中复选框,然后“ 完成”按钮将变为蓝色。 单击它,然后Google将设置您的Google Optimize帐户。

As part of this, Google has created your first container. This will contain your experiments (tests and personalizations), and it needs to be connected to your website.

在此过程中,Google创建了您的第一个容器。 这将包含您的实验(测试和个性化设置),并且需要将其连接到您的网站。

Your Google Optimize account, with step by step instructions on the right

Although you’re prompted here to create your first experiment, we suggest instead that you link Google Analytics to Google Optimize at this point.

虽然系统会提示您创建第一个实验,但建议您此时将Google Analytics(分析)链接到Google Optimize。

链接Google Optimize和Google Analytics(分析) (Linking Google Optimize and Google Analytics)

On the right-hand side of your screen, you’ll see the Link to Google Analytics step. Click the downwards arrow here and then click Link property.

在屏幕的右侧,您将看到“ 链接到Google Analytics(分析)”步骤。 单击此处的向下箭头,然后单击“ 链接属性”

Linking Google Optimize to your website (click Link property)

On the next screen, select the website you want to link with. If you can’t see your website here, then that could be because you’ve not finished setting it up in Google Analytics.

在下一个屏幕上,选择要链接的网站。 如果您在这里看不到您的网站,则可能是因为您尚未完成在Google Analytics(分析)中的设置

Select your website from the dropdown menu

Once you’ve clicked Link, you’ll see this pop up:

点击“ 链接”后 ,您会看到以下弹出窗口:

The Google Optimize snippet popup

If you’re going to use MonsterInsights to add Google Optimize to your site, which is what we recommend, you can simply click Skip for now. Otherwise, you may want to view and copy the code now as you’ll need to use a line of it later on.

如果您要使用MonsterInsights将Google Optimize添加到您的网站(我们建议这样做),则只需单击立即跳过 。 否则,您可能需要立即查看和复制代码,因为以后需要使用一行代码。

将Google Optimize添加到您的WordPress网站(简便方法) (Add Google Optimize to Your WordPress Site (Easy Way))

The easiest way to add Google Optimize to WordPress is by using MonsterInsights. It is the best Google Analytics plugin on the market. Note: you’ll need to have a Pro subscription to the plugin in order to use the Google Optimize addon.

将Google Optimize添加到WordPress的最简单方法是使用MonsterInsights。 它是市场上最好的Google Analytics(分析)插件 。 注意:您必须先订阅Pro插件才能使用Google Optimize插件。

Installing MonsterInsights

安装MonsterInsights

First, you need to install and activate the MonsterInsights plugin. For more details, see our step by step guide on how to install a WordPress plugin.

首先,您需要安装并激活MonsterInsights插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to visit the Insights » Settings page and enter your license key here. You can find this information under your account on the MonsterInsights website.

激活后,您需要访问数据分析»设置页面,然后在此处输入许可证密钥。 您可以在MonsterInsights网站上的帐户下找到此信息。

Enter your MonsterInsights license key on the Settings page

Next, you need to visit the Insights » Addons page and find the Google Optimize addon. Simply click the Install button next to Google Optimize addon, and it should automatically activate.

接下来,您需要访问“数据分析»插件”页面并找到Google Optimize插件。 只需单击Google Optimize插件旁边的“安装”按钮,它就会自动激活。

Installing the MonsterInsights Google Optimize addon

Once that addon is active, you can go to Insights » Settings » Conversions page to configure the settings.

该插件激活后,您可以转到数据分析»设置»转化页面以配置设置。

You’ll need to enter your Google Optimize Container ID here. You can find this listed against your container under the My Account section of your Google Optimize dashboard. You can also easily find it in the Container setup panel when you’re in the process of setting up your container.

您需要在此处输入您的Google Optimize Container ID。 您可以在Google Optimize信息中心的“我的帐户”部分下的容器中找到此列表。 在设置容器时,您也可以在“容器设置”面板中轻松找到它。

Finding your Google Optimize container ID

Simply enter this in MonsterInsights, and your site will be connected to Google Optimize.

只需在MonsterInsights中输入此内容,您的网站就会连接到Google Optimize。

You can also enable “Google Optimize’s Async Page Hide” here. This may improve users’ experience on your website, especially if they’re on a slow connection.

您还可以在此处启用“ Google Optimize的异步页面隐藏”。 这可以改善用户在您的网站上的体验,尤其是在连接速度较慢的情况下。

It hides the page for a small amount of time, so the variation you’ve created during your experiment can load. Otherwise, your regular content could load before it’s actually modified which will make the page “flicker” from your users’ perspective.

它会在一段时间内隐藏页面,因此可以加载您在实验期间创建的版本。 否则,您的常规内容可能会在实际修改之前加载,这会使页面从用户的角度“闪烁”。

Now that you’ve connected Google Optimize to your website, you’ll want to start running some A/B tests.

现在,您已经将Google Optimize连接到您的网站,您将要开始运行一些A / B测试。

手动将Google Optimize添加到您的WordPress网站 (Manually Add Google Optimize to Your WordPress Site)

You can also add Google Optimize to your WordPress site manually. This method is not recommended for beginners as you’ll have to manually modify your Google Analytics code.

您也可以将Google Optimize手动添加到WordPress网站。 不建议初学者使用此方法,因为您必须手动修改Google Analytics(分析)代码。

There are different ways to do this depending on how exactly you’ve added your Google Analytics code to your website.

有多种方法可以执行此操作,具体取决于您将Google Analytics(分析)代码添加到网站的精确程度。

In a moment, we are going to cover the process for adding Google Optimize to an analytics.js tag, as this is what many people will have used to set up Google Analytics.

稍后,我们将介绍将Google Optimize添加到analytics.js标记的过程,因为这是许多人用来设置Google Analytics(分析)的过程。

If you set up Analytics quite recently, you might instead be using Global Site Tag (gtag.js) to deploy Google Analytics. In this case, you can find instructions for this within Google Optimize itself. Just click the blue ‘Install Optimize’ link to get the instructions and code.

如果您是最近才设置Google Analytics(分析)的,那么您可能会改用全球站点代码(gtag.js)来部署Google Analytics(分析)。 在这种情况下,您可以在Google Optimize本身中找到相关说明。 只需单击蓝色的“安装优化”链接即可获取说明和代码。

If you’re using Google Tag Manager (GTM), see Google’s instructions on installing Optimize with Google Tag Manager.

如果您使用的是Google跟踪代码管理器(GTM) ,请参阅Google的“使用Google跟踪代码管理器 安装优化”的说明。

Assuming that you’re using the analytics.js tag, let’s cover the installation process.

假设您正在使用analytics.js标记,让我们介绍一下安装过程。

First, you need to find your Google Analytics code in your WordPress dashboard.

首先,您需要在WordPress仪表板中找到您的Google Analytics(分析)代码。

Note that this code must be in the header part of your pages in order for the Optimize code to work. If you’re using a plugin or theme that places Google Analytics in the footer, then you’ll need to move your code to be in the header instead.

请注意,此代码必须在页面的页眉部分中,以便优化代码起作用。 如果您使用的插件或主题将Google Analytics(分析)放在页脚中,则需要将代码移到页眉中。

Next, add the line ga(‘require’, ‘GTM-XXXXXXX’); to your Google Analytics code as follows, replacing GTM-XXXXXXX with your Optimize Container ID.

接下来,添加行ga('require','GTM-XXXXXXX'); 如下所示,将GTM-XXXXXXX替换为您的“优化容器ID”。



<!-- Google Analytics -->

<script>
(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');
</script>

<!-- End Google Analytics -->

Note that UA-XXXXXXXXX-1, in your code, will show your Google Analytics property ID.

请注意,代码中的UA-XXXXXXXXX-1将显示您的Google Analytics(分析)媒体资源ID。

Once you are done, please make sure to save your changes.

完成后,请确保保存更改。

Tip: If you’re not sure where to find and edit your Google Analytics code, then you may want to see whether you have a plugin like Insert Headers and Footers installed.

提示:如果不确定在哪里可以找到和编辑Google Analytics(分析)代码,则可能需要查看是否安装了“ 插入页眉和页脚”之类的插件。

If you’re using a premium WordPress theme, then there may be a place within it where you’ve put your Google Analytics code. You can check the theme’s documentation or contact their support team for help.

如果您使用的是高级WordPress主题 ,则可能在其中放置Google Analytics(分析)代码的地方。 您可以查看主题的文档或联系其支持团队寻求帮助。

If you’re using this method, then you’ll need to also manually add the anti-flicker snippet code to your site if you want to use it. You can’t just click a button to do this, like you can when using MonsterInsights.

如果您使用的是这种方法,则还需要将反闪烁代码段手动添加到您的网站。 您不能像使用MonsterInsights一样单击一个按钮来执行此操作。

Once you have setup Google Optimize, you’re ready to setup split tests. You can follow our guide on how to do A/B split testing in WordPress using Google Optimize.

设置好Google Optimize之后,就可以设置拆分测试了。 您可以遵循我们的指南, 了解如何使用Google Optimize在WordPress中进行A / B拆分测试

We hope this article helped you learn how to add Google Optimize in WordPress. You may also to see our proven tips on how to increase your blog traffic, and how to create an email newsletter for your website.

我们希望本文能帮助您学习如何在WordPress中添加Google Optimize。 您可能还会看到有关如何增加博客流量以及如何为网站创建电子邮件新闻通讯的可靠技巧。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-google-optimize-in-wordpress/

g2o optimize

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值