{"id":1761,"date":"2019-12-26T16:30:02","date_gmt":"2019-12-26T16:30:02","guid":{"rendered":"https:\/\/minsoftware.vn\/?p=1761"},"modified":"2025-09-11T14:35:32","modified_gmt":"2025-09-11T07:35:32","slug":"huong-dan-cach-chuyen-doi-chat-tawk-to-bang-google-tag-manager","status":"publish","type":"post","link":"https:\/\/minsoftdigital.com\/en\/huong-dan-cach-chuyen-doi-chat-tawk-to-bang-google-tag-manager\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e1ch chuy\u1ec3n \u0111\u1ed5i chat Tawk.to b\u1eb1ng Google Tag Manager"},"content":{"rendered":"<div class=\"fancybox\"><header class=\"entry-header\">\n<div class=\"entry-header-text entry-header-text-top text-center\"><\/div>\n<\/header>\n<div class=\"entry-content single-page\">\n<h3><strong style=\"font-size: 23.04px;\">B\u01b0\u1edbc 1: T\u1ea1o t\u00e0i kho\u1ea3n mi\u1ec5n ph\u00ed ph\u1ea7n m\u1ec1m chat tawk.to<\/strong><\/h3>\n<div>\n<div>Truy c\u1eadp trang ch\u1ee7 ph\u1ea7n m\u1ec1m tawk.to t\u1ea1o t\u00e0i kho\u1ea3n, Tawk.to s\u1ebd g\u1eedi mail t\u1ef1 \u0111\u1ed9ng ch\u1ee9a \u0111o\u1ea1n code script \u0111\u1ec3 g\u1eafn v\u00e0o trang web c\u1ee7a b\u1ea1n \u0111\u1ec3 tawk.to c\u00f3 th\u1ec3 ho\u1ea1t \u0111\u1ed9ng tr\u00ean website.<\/div>\n<div><\/div>\n<div>B\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp v\u00e0o trang web tawk.to \u0111\u1ec3 l\u1ea5y code n\u1ebfu kh\u00f4ng nh\u1eadn \u0111\u01b0\u1ee3c mail.<\/div>\n<div><\/div>\n<div>\u0110\u0103ng nh\u1eadp v\u00e0i t\u00e0i kho\u1ea3n tawk.to<\/div>\n<div>Truy c\u1eadp admin<\/div>\n<div>\u0110i\u1ec1n th\u00f4ng tin trang web<\/div>\n<div>Nh\u1ea5n t\u1ea1o<\/div>\n<\/div>\n<div>\n<h3><strong>B\u01b0\u1edbc 2: C\u00e0i \u0111\u1eb7t tawk.to l\u00ean web site b\u1eb1ng Google Tag Manager<\/strong><\/h3>\n<ul>\n<li>Truy c\u1eadp t\u00e0i kho\u1ea3n Google Tag Manager<\/li>\n<li>T\u1ea1o th\u1ebb m\u1edbi: lo\u1ea1i th\u1ebb HTML t\u00f9y ch\u1ec9nh<\/li>\n<li>Tr\u00ecnh k\u00edch ho\u1ea1t ch\u1ecdn T\u1ea5t c\u1ea3 c\u00e1c trang (All page)<\/li>\n<\/ul>\n<p><b>D\u00e1n \u0111o\u1ea1n code sau<\/b>\u00a0v\u00e0 thay \u201d\u00a0https:\/\/embed.tawk.to\/5916947b64f23d19a89b1f60\/default \u201d\u00a0\u00a0b\u1eb1ng m\u00e3 c\u1ee7a b\u1ea1n trong \u0111o\u1ea1n code tawk.to t\u1ea1o.<\/p>\n<p><b>N\u1ebfu kh\u00f4ng th\u1ea5y \u0111\u01b0\u1ee3c n\u1ed9i dung vui l\u00f2ng like page \u0111\u1ec3 ti\u1ebfp t\u1ee5c xem. Thank\u2019s !<\/b><\/p>\n<p>[sociallocker id=\u201d20715\u2033]<\/p>\n<div>&lt;script type=\u201dtext\/javascript\u201d&gt;<\/div>\n<div><\/div>\n<div>\/\/paste your Tawk embed code here, without Script tags<\/div>\n<div><\/div>\n<div>var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();<\/div>\n<div>(function(){<\/div>\n<div>var s1=document.createElement(\u201cscript\u201d),s0=document.getElementsByTagName(\u201cscript\u201d)[0];<\/div>\n<div>s1.async=true;<\/div>\n<div>s1.src=\u2019https:\/\/embed.tawk.to\/5c527c74ab52840489\/default\u2019;<\/div>\n<div>s1.charset=\u2019UTF-8\u2032;<\/div>\n<div>s1.setAttribute(\u2018crossorigin\u2019,\u2019*\u2019);<\/div>\n<div>s0.parentNode.insertBefore(s1,s0);<\/div>\n<div>})();<\/div>\n<div><\/div>\n<div><\/div>\n<div>\/\/ Event Listener function section<\/div>\n<div>\/\/ This will push predefined events exposed by the Tawk.to API into the dataLayer, which can be picked up via Google Tag Manager and forwarded onto any Tracking software, which can be connected to GTM<\/div>\n<div><\/div>\n<div>var dataLayerPush = function(event){<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 dataLayer.push({<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2018event\u2019: \u2018tawk.to\u2019,<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2018eventAction\u2019: event<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 });<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 console.log({<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2018event\u2019: \u2018tawk.to\u2019,<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2018eventAction\u2019: event<\/div>\n<div>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 });<\/div>\n<div>\u00a0 }<\/div>\n<div><\/div>\n<div>\u00a0 Tawk_API.onChatStarted = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat Started\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onChatMaximized = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat Window opened\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onChatMinimized = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat Window closed\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onChatHidden = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat Window hidden\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onChatStarted = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat started\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onChatEnded = function(){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cChat ended\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onPrechatSubmit = function(data){<\/div>\n<div>\u00a0 \u00a0dataLayerPush(\u201cPrechat form submitted\u201d);<\/div>\n<div>};<\/div>\n<div>\u00a0 Tawk_API.onOfflineSubmit = function(data){<\/div>\n<div>\u00a0 \u00a0 dataLayerPush(\u201cOffline Chat submit\u201d);<\/div>\n<div>};<\/div>\n<div>\n<p>&lt;\/script&gt; [\/sociallocker]<\/p>\n<h3><b>B\u01b0\u1edbc 3: Tracking s\u1ef1 ki\u1ec7n b\u1eaft \u0111\u1ea7u chat, \u0111i\u1ec7n th\u00f4ng tin tr\u01b0\u1edbc khi chat, offline chat tawk.to<\/b><\/h3>\n<p><b>3.1 T\u1ea1o bi\u1ebfn l\u1edbp d\u1eef li\u1ec7u \u0111\u1ec3 ghi nh\u1eadn s\u1ef1 ki\u1ec7n<\/b><\/p>\n<ul>\n<li>Menu tr\u00e1i ch\u1ecdn bi\u1ebfn.<\/li>\n<li>Lo\u1ea1i bi\u1ebfn s\u1ed1 ch\u1ecdn bi\u1ebfn l\u1edbp d\u1eef li\u1ec7u.<\/li>\n<li>T\u00ean bi\u1ebfn s\u1ed1\u00a0<strong>eventAction<\/strong>\u00a0(Trong \u0111o\u1ea1n code tr\u00ean\u00a0dataLayer.push({ \u2018event\u2019: \u2018tawk.to\u2019, \u2018eventAction\u2019: event });\u00a0\u0111\u1ea9y s\u1ef1 ki\u1ec7n v\u1edbi t\u00ean tawk.to)<\/li>\n<li>\u0110\u1eb7t t\u00ean v\u00e0 l\u01b0u bi\u1ebfn l\u1ea1i.<\/li>\n<\/ul>\n<p><b>3.2 T\u1ea1o tr\u00ecnh k\u00edch ho\u1ea1t (trigger) k\u00edch ho\u1ea1t s\u1ef1 ki\u1ec7n s\u1ef1 ki\u1ec7n tawk.to<\/b><\/p>\n<ul>\n<li>Menu tr\u00e1i ch\u1ecdn tr\u00ecnh k\u00edch ho\u1ea1t (trigger)<\/li>\n<li>T\u1ea1o tr\u00ecnh k\u00edch ho\u1ea1t m\u1edbi<\/li>\n<li>Lo\u1ea1i tr\u00ecnh k\u00edch ho\u1ea1t: S\u1ef1 ki\u1ec7n t\u00f9y ch\u1ec9nh<\/li>\n<li>T\u00ean tr\u00ecnh k\u00edch ho\u1ea1t:\u00a0<strong>tawk.to<\/strong><\/li>\n<li>\u0110\u1eb7t t\u00ean v\u00e0o l\u01b0u l\u1ea1i<\/li>\n<\/ul>\n<p><b>3.3 T\u1ea1o th\u1ebb \u0111\u1ea9y s\u1ef1 ki\u1ec7n chat tawk.to v\u1ec1 Google Analytics<\/b><\/p>\n<ul>\n<li>Menu tr\u00e1i ch\u1ecdn th\u1ebb (tag)<\/li>\n<li>T\u1ea1o th\u1ebb m\u1edbi<\/li>\n<li>Lo\u1ea1i th\u1ebb: Universal Analytics<\/li>\n<li>Danh m\u1ee5c:\u00a0<strong>tawk.to<\/strong><\/li>\n<li>H\u00e0nh \u0111\u1ed9ng: {eventAction} bi\u1ebfn b\u1ea1n v\u1eeba t\u1ea1o b\u1ea1n c\u00f3 th\u1ec3 nh\u1ea5n + k\u1ebf b\u00ean \u0111\u1ec3 hi\u1ec3n th\u1ecb danh s\u00e1ch bi\u1ebfn.<\/li>\n<li>Nh\u00e3n: B\u1ea1n ch\u1ecdn Page Path \u0111\u1ec3 bi\u1ebft kh\u00e1ch h\u00e0ng chat \u1edf b\u00e0i n\u00e0o trong trang web<\/li>\n<li>C\u00e0i \u0111\u1eb7t Google Analytics: ch\u1ecdn bi\u1ebfn GA n\u1ebfu b\u1ea1n ch\u01b0a t\u1ea1o bi\u1ebfn c\u00f3 th\u1ec3 nh\u1ea5n v\u00e0o ch\u1ecdn bi\u1ebfn c\u00e0i \u0111\u1eb7t v\u00e0 t\u1ea1o m\u1edbi<\/li>\n<li>Tr\u00ecnh k\u00edch ho\u1ea1t ch\u1ecdn: Tawk.to Trigger (tr\u00ecnh k\u00edch h\u1ecdat v\u1eeba t\u1ea1o)<\/li>\n<li>\u0110\u1eb7t t\u00ean th\u1ebb v\u00e0 l\u01b0u th\u1ebb.<\/li>\n<\/ul>\n<p><b>3.4 Ki\u1ec3m tra c\u00e0i \u0111\u1eb7t s\u1ef1 ki\u1ec7n chuy\u1ec3n \u0111\u1ed5i chat tawk.to \u0111\u00e3 ho\u1ea1t \u0111\u1ed9ng ch\u01b0a?<\/b><\/p>\n<p>Ch\u1ecdn xem tr\u01b0\u1edbc trong Google Tag Manager<\/p>\n<p>Quay l\u1ea1i website c\u1ee7a b\u1ea1n th\u1eed chat r\u1ed3i xem th\u1ebb tawk.to GA c\u00f3 ho\u1ea1t \u0111\u1ed9ng nh\u01b0 h\u00ecnh b\u00ean d\u01b0\u1edbi kh\u00f4ng n\u1ebfu ho\u1ea1t \u0111\u1ed9ng th\u00ec b\u1ea1n \u0111\u00e3 c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng.<\/p>\n<p><b>3.5 C\u00e0i \u0111\u1eb7t s\u1ef1 ki\u1ec7n chat tawk.to trong Google Analytics<\/b><\/p>\n<ul>\n<li>Truy c\u1eadp t\u00e0i kho\u1ea3n\u00a0<a href=\"https:\/\/analytics.google.com\/\" target=\"_blank\" rel=\"noopener\">Google Analytics<\/a><\/li>\n<li>Menu tr\u00e1i Anlytics ch\u1ecdn qu\u1ea3n tr\u1ecb<\/li>\n<li>Ch\u1ecdn M\u1ee5c ti\u00eau v\u00e0 t\u1ea1o m\u1edbi<\/li>\n<li>Thi\u1ebft l\u1eadp m\u1ee5c ti\u00eau: T\u00f9y ch\u1ec9nh<\/li>\n<li>M\u00f4 t\u1ea3 m\u1ee5c ti\u00eau: \u0110\u1eb7t t\u00ean v\u00e0 ch\u1ecdn s\u1ef1 ki\u1ec7n<\/li>\n<li>Chi ti\u1ebft m\u1ee5c ti\u00eau: danh muc -&gt; tawk.to (gi\u1ed1ng khi b\u1ea1n \u0111\u1eb7t khi t\u1ea1o th\u1ebb trong Tag Manager)<\/li>\n<li>L\u01b0u l\u1ea1i m\u1ee5c ti\u00eau<\/li>\n<\/ul>\n<p>B\u1ea1n th\u1eafc m\u1eafc v\u00ec sao kh\u00f4ng \u0111i\u1ec1n t\u00e1c v\u1ee5, nh\u00e3n nh\u01b0 b\u00ean Google Tag Manager. Trong l\u00fac t\u1ea1o th\u1ebb s\u1ef1 ki\u1ec7n chat tawk.to b\u1ea1n t\u1ea1o t\u00e1c v\u1ee5 v\u00e0 nh\u00e3n b\u1eb1ng bi\u1ebfn s\u1ed1. B\u1ea1n c\u00f3 th\u1ec3 xem l\u1ea1i \u0111o\u1ea1n code \u0111\u1ea7u ti\u00ean khi t\u1ea1o th\u1ebb tawk.to t\u00e1c v\u1ee5 s\u1ebd c\u00f3 3 s\u1ef1 ki\u00ean kh\u00e1c nhau b\u1eaft \u0111\u1ea7u chat, \u0111i\u1ec1n form tr\u01b0\u1edbc khi chat, \u0111i\u1ec1n form khi b\u1ea1n offiline. Thay v\u00ec ph\u1ea3i t\u1ea1o 3 th\u1ebb kh\u00e1c nhau theo 3 s\u1ef1 ki\u1ec7n tr\u00ean m\u00ecnh t\u1ea1o bi\u1ebfn \u0111\u1ec3 l\u01b0u tr\u1eef t\u1ea1m th\u1eddi r\u1ed3i \u0111\u1ea9y v\u1ec1 analytics.<\/p>\n<p>Ch\u00fac c\u00e1c b\u1ea1n c\u00e0i \u0111\u1eb7t th\u00e0nh c\u00f4ng ch\u0103m s\u00f3c kh\u00e1ch h\u00e0ng t\u1ed1t h\u01a1n v\u00e0 quan tr\u1ecdng t\u1ed1i \u01b0u \u0111\u01b0\u1ee3c qu\u1ea3ng c\u00e1o.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>B\u01b0\u1edbc 1: T\u1ea1o t\u00e0i kho\u1ea3n mi\u1ec5n ph\u00ed ph\u1ea7n m\u1ec1m chat tawk.to Truy c\u1eadp trang ch\u1ee7 ph\u1ea7n m\u1ec1m tawk.to t\u1ea1o t\u00e0i kho\u1ea3n, Tawk.to s\u1ebd g\u1eedi mail t\u1ef1 \u0111\u1ed9ng ch\u1ee9a \u0111o\u1ea1n code script \u0111\u1ec3 g\u1eafn v\u00e0o trang web c\u1ee7a b\u1ea1n \u0111\u1ec3 tawk.to c\u00f3 th\u1ec3 ho\u1ea1t \u0111\u1ed9ng tr\u00ean website. B\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp v\u00e0o trang web tawk.to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":590,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10],"tags":[217,218],"class_list":["post-1761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-digital-maketing","tag-google-tag-manager","tag-tawk-to"],"acf":[],"_links":{"self":[{"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/posts\/1761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/comments?post=1761"}],"version-history":[{"count":1,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/posts\/1761\/revisions"}],"predecessor-version":[{"id":6236,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/posts\/1761\/revisions\/6236"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/media\/590"}],"wp:attachment":[{"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/media?parent=1761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/categories?post=1761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minsoftdigital.com\/en\/wp-json\/wp\/v2\/tags?post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}