Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

[GA] เผื่อใครยังไม่รู้! เเนะวิธีการติดตั้ง Google Analytics ผ่าน Google Tag Manager ทำอย่างไร

Google Analytics คืออะไร ?

Google Analytics นั้นเป็นเครื่องมือฟรี ( Upgrade เเบบเสียเงินได้ ) ของทาง Google เอง โดยตัวมันเองนั้นทำหน้าที่เก็บสถิติเกี่ยวกับผู้เข้าชมเว็บไซต์ รวมไปถึงพฤติกรรมของคนที่เข้าเยี่ยมชมเว็บไซด์ เช่น เข้าหน้าไหน ออกหน้าไหน ใช้เวลาอยู่ในเว็บไซต์นานมั้ย เข้ามาจากอุปกรณ์หรือมาจากช่องทางใด้บ้าง ซึ่งข้อมูลเหล่านั้นล้วนแต่มีประโยชน์กับบรรดานักการตลาดออนไลน์ในปัจจุบันเป็นอย่างมาก

อ่านต่อที่ Google Analytics คืออะไร ?

วิธีใช้งานของมันนั้น สามารถนำ Tracking Code ไปติดตั้งในหน้าเว็บไซต์ทุกๆหน้าของเราได้ โดยติดตั้งภายในส่วนของ <head> ได้ครับ ทาง Google จะแนะนำให้ติดตั้งไว้หลังจากเปิด <head>

หา Google Analytics Tracking ID อย่างไร ??

สำหรับคนที่เริ่มใช้ Google Analytics คงจะคุ้นเคยกับคำว่า Account, Property และ View กันอย่างดี เนื่องจากมันเป็น 3 ส่วนหลังๆในการจัดการกับ Setting ต่างๆในบัญชี Google Analytics นั่นเอง

ซึ่ง ตัว Tracking ID จะอยู่ที่หน้า Property สามารถเข้าไปดูได้ง่ายๆที่ Tracking Info >Tracking Code หน้าตาของ ID จะขึ้นต้นด้วย UA – xxxxxxx  

Google Tag Manager  ประกอบด้วยอะไรบ้าง ??

ก่อนที่จะเริ่มติด GA ผ่านทาง Tag Manager เราต้องมีบัญชีเสียก่อน ( สมัครได้ที่ tagmanager.google.com  ) เมื่อเรามีบัญชีเเล้ว เราต้องทำความเข้าใจก่อนว่า Tag Manager มีองค์ประกอบเบื้องต้นอะไรบ้าง

  • Account  เป็นที่อยู่ของ Container ต่างๆที่เราเก็บไว้เพื่อใช้งาน
  • Container เป็นที่สำหรับเก็บ Tag ,Triggers หรือ Variables ซึ่ง Container จะมีไว้สำหรับวางบน Website หรือบน Application ซึ่งถ้าคุณมีทั้ง 2 อย่างนี้ ต้องมี 2 Container อยู่ใน Account นั้นๆ
  • Tag คือ Code ต่างๆ ที่เรานำไปวางบนหน้าเว็บไซต์ เช่น Google Analyticss ,Facebook Pixel หรือกระทั่ง Google Ads Remarketing
  • Triggers เอาไว้สั่งให้ Tag ต่างๆทำงาน
  • Variables เป็นได้หลายๆอย่าง เช่น URL ,Click Class ,Click Target

วิธีการติดตั้ง Google Analytics ผ่าน Google Tag Manager

  1. สร้าง Account ขึ้นมาใหม่เพื่อไว้ใช้วาง Container

ขั้นเเรกเราต้องมี Account เพื่อไว้ใช้วางกล่อง Container โดยเลือกประเภท Web เนื่องจากเราจะเริ่มที่ทำ Page View บนเว็บไซต์

หลังจากสร้าง Container แล้วมันจะมี GTM Code เด้งมา โดยหน้าตาของ Code GTM นั้นจะมี 2 ส่วนด้วยกันครับ ทาง Google นั้นแนะนำให้วาง Code ชุดแรก ไว้ภายใต้ <head> ครับ ส่วนชุดที่สองนั้นจะแนะนำไว้หลังจากเปิด <body> ทันทีเลยครับ

ขั้นตอนการวาง Code GTM นั้นจะเป็นขั้นตอนเดียวที่เราไปง้อ Web Dev หลังจากนั้นไม่ว่าเราอยากจะติดตั้ง Google Analytics ติดตั้ง Facebook Pixel ติดตั้ง Remarketing Code รวมไปถึง Custom HTML ต่างๆ เราสามารถทำได้เองผ่านหน้า Dashboard ของ Google Tag Manager เองเลยครับ

2. เราต้องสร้าง Tag ขึ้นมาเพื่อไว้ใช้เก็บ Tracking ID เราสามารถกดสร้าง New Tag และเลือกประเภทของ Tag เป็น Universal Analytics ได้ หลังจากนั้นเราก็มาตั้งค่าให้มัน เราจะเก็บ Page View ดังนั้นเราเลือก Track Type เป็น Page View ได้เลยครับโดยที่เราจะใส่ Tracking ID ตรง Google Analytics Settings ได้ 2 วิธีด้วยกัน คือผ่านการกำหนดตัวแปร Variables ซึ่งเราต้องตั้งค่า Variable Configuration ใหม่ และใส่ Tracking ID ตรงนั้น กับอีกวิธีหนึ่งคือ Enable overriding settings in this tag ถ้าเลือกวิธีนี้มันก็จะบังคับให้ Tag ชุดนี้ทำงานให้กับ Tracking ID ที่เราใส่ลง

3. ขั้นตอนนี้จะเป็นการกำหนด Trigger ว่าจะให้ทำงานเมื่อใด โดยปกติแล้ว Google Analytics ประเภท Page View จะให้เราตั้งค่า Trigger ได้เลยต่อจากการสร้าง Tag ขึ้นมา ซึ่งมันยังบังคับประเภทของ Trigger ให้เองอีกว่าต้องใช้ ประเภท Page View และทำงานทุกๆ Page View เราก็ไม่ว่ากันครับ ทำมาให้ขนาดนี้แล้ว เราก็ใช้ตามนั้นได้เลย

ถ้าให้อธิบายเเบบคร่าวๆ ก็คือ

  • สร้างบัญชี GA เเละ GTM
  • เข้าไปเก็บ GA Tracking ID ให้เรียบร้อย
  • สร้าง Account ใหม่ใน GTM เพื่อไว้วาง Container
  • สร้าง Tag ใหม่ใน Container ที่เพิ่งสร้าง เพื่อเอา GA Tracking ID ในข้อ 2 มาวาง
  • ถ้าเราทำแบบ Page View เลยไม่ต้องสร้าง Trigger ใหม่เอง เลยใช้ที่ GTM บังคับมา
  • กด Submit ให้เรียบร้อย แล้วก็ไปกด Publish เพื่อ Go Live เป็นอันเสร็จ

เเละทั้งหมดนี่คือการใช้งานร่วมกันระหว่าง Google Analytics เเละ Google Tag Manager เพื่อการใช้งานที่สะดวกสบาย เเม่นยำ เเละได้มาตรฐาน การทำงานต่างๆ ในปัจจุบันเราเเทบไม่ต้องคำนวณ ติดตามผลด้วยตัวเอง เพราะทาง Google ได้สร้างเครื่องมือเหล่านี้มา Support การทำงานของคุณเเล้ว

“วันพรุ่งนี้ที่ดีกว่า จะได้มาต้องเริ่มที่วันนี้”

“A better tomorrow starts today”