วิธีการตั้งค่า Google Analytics
Google Analytics ใช้ในการดูและทำความเข้าใจการเข้าชมเว็บ
ใช้งานได้ฟรีและใช้งานง่าย
คุณสามารถปรับแต่งได้สำหรับกรณีการใช้งานต่างๆ
มันทำงานออกจากกล่อง
มันรวดเร็วในการตั้งค่า รับข้อมูลเชิงลึกของคุณวันนี้!
สร้างเว็บไซต์ฟรีของฉัน ❯ข้ามการอ่านเกี่ยวกับ Google Analytics พาฉันไปที่ขั้นตอนแรกโดยตรง ไปที่ขั้นตอนแรก
Google Analytics คืออะไร
Google Analytics เป็นโซลูชันการวิเคราะห์เว็บ
ได้รับการพัฒนาและสนับสนุนโดย Google
เวอร์ชันใหม่ล่าสุดเรียกว่า Google Analytics 4
สามารถใช้เพื่อดูข้อมูล เช่น ผู้ชม การดูหน้าเว็บ เซสชันและข้อมูลประชากร และเหตุการณ์
เหตุใดจึงเปิดใช้ Google Analytics
ทำความเข้าใจการเข้าชมเว็บของคุณเพื่อการตัดสินใจที่ดีขึ้น
ทำความเข้าใจและปรับปรุงกระบวนการขาย
เรียนรู้จากการทดลอง (เช่น การทดสอบ a/b)
Google มีโซลูชันอื่นที่เรียกว่า Google Optimize โซลูชันนี้จัดทำขึ้นสำหรับการทดสอบ
Google Analytics สำหรับใคร?
Google Analytics มีประโยชน์สำหรับทุกคนที่มีเว็บไซต์
มันให้ข้อมูลเกี่ยวกับผู้ที่ใช้เว็บไซต์ของคุณและวิธีที่พวกเขาโต้ตอบกับมัน
นอกจากนี้อินเทอร์เฟซยังเข้าใจง่าย
คุณไม่จำเป็นต้องมีพื้นฐานการวิเคราะห์เพื่อใช้และสำรวจบริการ
วิธีตั้งค่า Google Analytics ทีละขั้นตอน
Google Analytics สามารถตั้งค่าได้สองวิธีคือ แท็กเว็บไซต์สากล (gtag.js)หรือGoogle Tag Manager
วิธีที่ง่ายที่สุดคือการใช้แท็กเว็บไซต์ทั่วโลก
บทแนะนำนี้จะใช้วิธีแท็กเว็บไซต์ทั่วโลก
การเตรียมการ
ตัดสินใจว่าจะใช้ตัวแก้ไขโค้ดใดและตั้งค่าสภาพแวดล้อมของคุณ
W3Schools ได้สร้างโปรแกรมแก้ไขโค้ดที่ใช้งานง่าย ชื่อW3Schools Spaces ลงทะเบียนและเริ่มต้นในไม่กี่คลิก
เริ่มฟรี ❯สร้าง ไฟล์ index.html ของคุณ เพื่อให้คุณพร้อมที่จะป้อนรหัส
การตั้งค่าทั้งหมด ไปกันเถอะ!
ตั้งค่า Google Analytics: แท็กเว็บไซต์ทั่วโลก
ขั้นตอนที่ 1: สร้างบัญชี Google Analytics
ไปที่ Analytics: สร้างบัญชีหรือลงชื่อเข้าใช้ Analytics
ลิงก์ในย่อหน้าด้านบนจะนำคุณไปยังหน้า Landing Page ของ Google Analytics
คลิกปุ่ม "เริ่มฟรี"
ขั้นตอนที่ 2: เข้าสู่หน้าต้อนรับ
หลังจากสร้างบัญชีหรือลงชื่อเข้าใช้ คุณจะได้รับการต้อนรับสู่โซลูชัน
กดปุ่ม "เริ่มการวัด" เพื่อดำเนินการต่อ
ขั้นตอนที่ 3: การตั้งค่าบัญชี
คุณมีสองการตัดสินใจที่จะทำที่นี่
- ป้อนชื่อบัญชีของคุณ
- ตัดสินใจว่าคุณต้องการแชร์ข้อมูลใด
- คลิกปุ่ม "ถัดไป"
หนึ่งบัญชีสามารถมีรหัสติดตามได้มากกว่าหนึ่งรหัส คุณสามารถติดตามมากกว่าหนึ่งเว็บไซต์ด้วยบัญชี
ขั้นตอนที่ 4: การตั้งค่าคุณสมบัติ
คุณสมบัติคือบริการที่คุณวัด เช่น เว็บไซต์ แอปพลิเคชัน โครงสร้างลิงก์ ฯลฯ
- ป้อนชื่อคุณสมบัติ
- ป้อนเขตเวลาของคุณ
- ป้อนสกุลเงินที่คุณใช้
- คลิกปุ่ม "ถัดไป"
ขั้นตอนที่ 5: เพิ่มข้อมูลทางธุรกิจ
Analytics ใช้ข้อมูลเพื่อปรับแต่งประสบการณ์ของคุณ
- เลือกหมวดหมู่อุตสาหกรรมของคุณ
- เลือกขนาดธุรกิจ
- Tick the boxes for how you are planning to use Analytics.
- Click the "Create" button to proceed.
Step 6: Terms of Service Agreement
Read and understand the terms of service.
Tick the GDPR box and click the "I accept" button if you agree.
Step 7: Email subscriptions
- Tick or uncheck all boxes.
- Click the "Save" button to continue.
Step 8: Select platform
Chose the platform where you are collecting data.
Then, click the relevant platform to continue.
We are continuing with "Web" as the example in this tutorial.
Step 9: Data stream setup
Enter data stream details.
- The URL to your site.
- The name that you want to give the stream.
- Decide if you are to enable enhanced measurement or not.
- Click on the "Create stream" button to continue.
The enhanced measurement can give the data more context. Improving your understanding of the traffic.
Step 10: Web stream overview
Here you can see a detailed overview of the web stream.
Here are the key takeaways from the overview.
1. Stream URL.
The Stream URL is the link to the connected site.
2. Measurement ID
The Measurement ID is the identifier for your data stream.
It has a format of G-XXXXXXX.
Google Analytics 4 uses Measurement ID. Older versions use Tracking ID. You can not have both.
3. Tagging instructions
Decide to use Global site tag (gtag.js) or Tag manager.
This tutorial will use the Global site tag.
Installing the Global site tag is the easiest and quickest way of getting it up and running.
Step 11: Global site tag (gtag.js)
Click the "Global site tag (gtag.js)" row.
Here you can see a code snippet.
The code snippet is a script to allow Google to measure data on your site.
You can see the Measurement ID in the second last line in the code snippet.
The code snippet
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DNJN1PF3CS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
</script>
Step 12: Enter the code snippet
Copy the code snippet.
Make sure to include your Measurement ID.
Locate the <head> tag in your HTML.
Paste the code snippet just below the <head> tag.
Save and publish the code.
We used W3Schools Spaces in this example.
Step 13: Test that it works
Ensure that you have successfully saved and published the code snippet with the correct Measurement ID.
Open the URL for the site you have connected to the data stream.
Click on "Real time" on the menu to the left.
Confirm that you see yourself as an active user.
Congrats. You have successfully enabled Google Analytics for your site!
Explore Google Analytics
Recommended related topics are Tag manager and Events
Spend time in the service to learn about your user activity, commerce, demographics, device, and referrals.
Tip: Ever heard of W3Schools Spaces? It is a personal space where you can make a website from scratch or use a template and host it for free.
It has everything you need in the browser.
Get started in a few clicks.
Start now for free ❯* no credit card required