谷歌分析(Google Analytics)一直是网站所有者用来监控其网络流量的最受欢迎的工具之一。
在Google Analytics(分析(Google Analytics))中设置新网站并不像应有的那么简单。但是,按照以下步骤,您应该能够在 30 分钟内启用您的网站并使用Google Analytics跟踪。(Google Analytics)
设置您的 Google Analytics(分析)媒体资源(Set Up Your Google Analytics Property)
要在Google Analytics(Google Analytics)上设置您的网站,您需要在Google Analytics Administration中添加该网站。
- 打开Google Analytics后,选择左侧导航菜单底部的管理员。(Admin)
您将有几个选项,具体取决于您希望在Google Analytics(Google Analytics)中管理多少个网站。您最多只能有 4 个Google Analytics(分析(Google Analytics))帐户,每个帐户最多可以有 50 个网络媒体资源,因此在组织网络媒体资源时请记住这一点。
- 您可以使用一个帐户来管理多个网站。如果您还没有任何 Analytics 帐户,请选择Create Account。为帐户起一个描述您的互联网公司或组织的名称。如果需要,您可以为网站创建一个帐户,并为该帐户提供与该网站相同的名称。
- 创建帐户后,返回Google Analytics(分析(Google Analytics))管理,选择您创建的帐户,然后选择Create Property。
- 在下一个屏幕上,选择Create property下的Web。
- 向下滚动(Scroll)到页面底部并选择继续(Continue)。
- 在下一个屏幕上,在网站名称字段中为您的新网站命名,在(Website Name)网站 URL(Website URL)字段中填写URL ,选择正确的行业类别(Industry Category),最后设置报告时区(Reporting Time Zone)。
注意(Note):如果您在您的网站上启用了SSL ,请确保选择“https” 。
将 Google Analytics 跟踪代码添加到您的网站(Add The Google Analytics Tracking Code To Your Website)
Google Analytics(分析(Google Analytics))成功创建您的新网站资源后,您将看到一个跟踪ID(Tracking ID) ,该 ID代表Analytics将用于记录您网站的所有流量的代码。
- 在Tracking ID下,您会在Global Site Tag下看到一个大文本字段,其中包含您需要在您网站的每个页面上安装的脚本,以便Google Analytics跟踪工作。
理想情况下,您需要将其插入到每个页面的标签中。复制此字段中的脚本并将其保存在记事本(Notepad)或其他不会丢失的地方。
如果您使用的是WordPress网站,则添加此脚本很容易。
- 打开您网站的WordPress仪表板,从左侧导航菜单中选择外观,然后从菜单中选择(Appearance)主题编辑器(Theme Editor)。
通常,大多数 WordPress 主题都包含一个主题标题(Theme Header)( header.php )。在主题编辑器(Theme Editor)窗口中,从主题文件列表中选择它。
在编辑器窗口中,找到标签并在其后插入Google Analytics文本。
- 在页面底部,选择更新文件(Update File)按钮。
- 如果您使用的是CDN插件,请确保完全清除 CDN(Purge CDN completely)。这将确保任何已缓存您网站的浏览器都能检索到最新版本,包括新的Google Analytics脚本。
如果您不使用WordPress网站,则只需使用类似的方法来确保Google Analytics脚本包含在您网站每个页面的标签中。
完成后,您现在应该会在您创建的Google Analytics(分析(Analytics))帐户下看到您的新网站。
高级分析功能(Advanced Analytics Features)
首次安装跟踪代码时,默认情况下未启用一些Google Analytics(分析)跟踪功能。(Google Analytics)但是,这些功能可以提供有关到达您网站的访问者的更深入的信息。
- 要查看这些功能,请登录您的Google Analytics帐户,转到管理(Administration)并打开您创建的帐户。
- 选择您创建的网站的属性,然后选择属性设置(Property Settings)。
在“属性设置”(Property Settings)窗口中,如果向下滚动,您会看到几个需要考虑的选项。这些是您可以启用的附加功能。
- 向下滚动到Advertising Features部分,然后在Enable Demographics and Interest Reports下,将设置设置为ON。
这会在 Analytics 中启用其他报告,告诉您访问您网站的访问者的年龄、性别和兴趣。
这些信息对于根据大多数访问者的兴趣和人口统计数据定制您的网站非常有帮助。
- 接下来,向下滚动到Search Console部分并选择Adjust Search Console。
这是确保Google Search Console数据与同一媒体资源的Analytics帐户相关联的快速方法。(Analytics)启用此功能后,您将能够在Google Analytics(分析(Analytics))报告中查看Search Console数据。
- 要启用此功能,请在Search Console 设置(Search Console Settings)页面上,选择添加(Add)链接。
您会看到一个页面,其中包含在您的Search Console帐户中启用的所有网站,您可以选择将其链接到您刚刚创建的Google Analytics(分析)媒体资源。(Analytics)
如果您刚刚创建了自己的网站并且从未将其添加到Google Search Console中,那么您需要先执行此操作,然后才能将其链接到Google Analytics。
- 为此,请选择将网站添加到 Search Console(Add a site to Search Console)。这超出了本文的范围,但过程相当简单。
- 在Google Search Console中,只需使用站点下拉列表并滚动到底部以选择添加属性(Add property)。按照说明在Google Search Console(Google Search Console)中设置域。
- 验证后,下次您访问上面的同一Google Analytics(分析(Google Analytics))页面时,您会看到列出的新域。然后,您可以选择它以将其链接到同一网站的Google Analytics(分析(Google Analytics))帐户。
- 您要在Google Analytics(分析)属性设置中启用的最后一个功能位于(Google Analytics Property Settings)属性设置(Property Settings)页面的底部。在User Analysis下,您将看到Enable Users Metric in Reporting的设置。
这是一项新功能,谷歌(Google)在用户浏览器上使用第一方 cookie 来更准确地了解访问者数量。这样可以降低错误率,并为您提供更准确的图片,了解实际访问您网站的用户数量以及他们访问的页面。
现在您已经为您的网站启用了Google Analytics,并启用了所有高级功能。继续访问您网站的Google Analytics(分析(Google Analytics))中的属性页,几天后您将开始看到所有网站统计信息中的数据。
How To Set Up Your Website On Google Analytics
Google Analytics has always been one of the most popular toolѕ websitе owners have used to monitor their wеb traffic.
Setting up a new website in Google Analytics isn’t quite as straightforward as it should be. However, following the steps below, you should be able to have your website enabled with Google Analytics tracking in under 30 minutes.
Set Up Your Google Analytics Property
To set up your website on Google Analytics, you need to add the website in Google Analytics Administration.
- Once Google Analytics is open, select Admin at the bottom of the left navigation menu.
You’ll have a few options depending how many websites you hope to manage in Google Analytics. You’re only allowed up to 4 Google Analytics accounts, and each account is allowed up to 50 web properties, so keep that in mind when organizing your web properties.
- You can use a single account to manage multiple websites. If you don’t have any Analytics accounts at all yet, then select Create Account. Give the account a name that describes your internet company or organization. If you want, you can create a single account for a website and give the account the same name as that website.
- Once you’ve created the account, go back to Google Analytics administration, select the account you’ve created, and select Create Property.
- On the next screen, select Web under Create property.
- Scroll down to the bottom of the page and select Continue.
- On the next screen, give your new website a name in the Website Name field, fill in the URL in the Website URL field, select the correct Industry Category, and finally set the Reporting Time Zone.
Note: Make sure to select “https” if you’ve enabled SSL on your website.
Add The Google Analytics Tracking Code To Your Website
Once Google Analytics successfully creates your new website property, you’ll see a Tracking ID that represents the code Analytics will use to log all traffic for your site.
- Under the Tracking ID, you’ll see a large text field under Global Site Tag that has the script you’ll need to install on every page of your website for Google Analytics tracking to work.
Ideally, you’ll want to insert this inside the <HEAD> tags of every page. Copy the script in this field and save it in Notepad or some other place where you won’t lose it.
If you’re using a WordPress website, adding this script is easy.
- Open your website’s WordPress dashboard, select Appearance from the left navigation menu, and choose Theme Editor from the menu.
Typically, most WordPress themes include a Theme Header (header.php). In the Theme Editor window, select this from the list of theme files.
In the editor window, find the <HEAD> tag and insert the Google Analytics text after it.
- At the bottom of the page, select the Update File button.
- If you’re using a CDN plugin, make sure to Purge CDN completely. This will make sure any browsers that have cached your site will retrieve the latest version, including the new Google Analytics script.
If you aren’t using a WordPress site, you’ll just need to use a similar approach to make sure the Google Analytics script is included inside the <HEAD> tags on every page of your site.
Once you’re finished, you should now see your new website listed under the Analytics account that you’ve created.
Advanced Analytics Features
There are a few Google Analytics tracking features that aren’t enabled by default when you first install the tracking code. However, these features can provide much more insightful information about the visitors that arrive on your site.
- To see these features, log into your Google Analytics account, go to Administration and open the account you’ve created.
- Select the property for the website you created and select Property Settings.
In the Property Settings window, if you scroll down you’ll see several options to consider. These are additional features you can enable.
- Scroll down to the Advertising Features section and under Enable Demographics and Interest Reports, set the setting to ON.
This enables additional reports in Analytics that tells you the age, gender, and interests of visitors who arrive on your site.
This information can be tremendously helpful in tailoring your site for the interests and demographics of the majority of your visitors.
- Next, scroll down to the Search Console section and select Adjust Search Console.
This is a quick way to make sure the Google Search Console data is linked to the Analytics account for the same property. You’ll be able to see Search Console data in your Google Analytics reports once you enable this.
- To enable this, on the Search Console Settings page, select the Add link.
You’ll see a page with all of the websites enabled in your Search Console account that you can choose to link to the Analytics property you just created.
If you’ve just created your website and never added it to Google Search Console, you’ll need to do that before you can link it to Google Analytics.
- To do this, select Add a site to Search Console. This is beyond the scope of this article, but the process is fairly simple.
- In the Google Search Console, just use the site dropdown list and scroll to the bottom to select Add property. Follow the instructions to set up the domain in Google Search Console.
- Once it’s verified, the next time you visit the same Google Analytics page above, you’ll see your new domain listed. You can then select it to link it to the Google Analytics account for that same website.
- The last feature you’ll want to enable in the Google Analytics Property Settings is at the bottom of the Property Settings page. Under User Analysis, you’ll see a setting for Enable Users Metric in Reporting.
This is a new feature where Google uses first-party cookies on user browsers to get a more accurate picture of visitor count. This reduces the error rate and provides you with a much more accurate picture of how many users are actually visiting your site and what page they’re visiting.
Now you have Google Analytics enabled for your site and all of the advanced features enabled. Keep visiting the property page in Google Analytics for your site, and in a couple of days you’ll start seeing data flowing in with all of your website statistics.