{"id":1475,"date":"2024-01-05T11:14:01","date_gmt":"2024-01-05T11:14:01","guid":{"rendered":"https:\/\/theoptimizer.io\/help\/?post_type=ht_kb&#038;p=1475"},"modified":"2024-10-08T18:29:46","modified_gmt":"2024-10-08T18:29:46","slug":"how-to-connect-tiktok-to-google-analytics","status":"publish","type":"ht_kb","link":"https:\/\/theoptimizer.io\/help\/knowledge-base\/how-to-connect-tiktok-to-google-analytics\/","title":{"rendered":"How to connect TikTok to Google Analytics?"},"content":{"rendered":"\n<div class=\"wp-block-presto-player-reusable-edit\"><!--presto-player:video_id=2--><figure class=\"wp-block-video presto-block-video  presto-provider-youtube\" style=\"--plyr-color-main: var(--presto-player-highlight-color, #00b3ff); --presto-player-logo-width: 150px; \">\n    <presto-player  id=\"presto-player-1\" src=\"\/\/www.youtube.com\/embed\/IXWdGVhGCpE?iv_load_policy=3&amp;modestbranding=1&amp;playinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1\" media-title=\"How to connect Google Analytics to TikTok?\" css=\"\" class=\"presto-video-id-2 presto-preset-id-5 skin-modern\" skin=\"modern\" icon-url=\"https:\/\/theoptimizer.io\/help\/wp-content\/plugins\/presto-player\/img\/sprite.svg\" preload=\"\" poster=\"\" playsinline  >\n        \n\n    <\/presto-player>\n<\/figure>\t\t<script>\n\t\t\tvar player = document.querySelector('presto-player#presto-player-1');\n\t\t\tplayer.video_id = 2;\n\t\t\t\t\t\t\t\t\t\t\t\tplayer.preset = {\"id\":5,\"name\":\"Youtube Optimized\",\"slug\":\"youtube\",\"icon\":\"youtube\",\"skin\":\"modern\",\"play-large\":true,\"rewind\":true,\"play\":true,\"fast-forward\":true,\"progress\":true,\"current-time\":true,\"mute\":true,\"volume\":true,\"speed\":true,\"pip\":false,\"fullscreen\":true,\"captions\":false,\"reset_on_end\":true,\"auto_hide\":true,\"captions_enabled\":false,\"save_player_position\":false,\"sticky_scroll\":false,\"sticky_scroll_position\":\"bottom right\",\"on_video_end\":\"select\",\"play_video_viewport\":false,\"hide_youtube\":false,\"lazy_load_youtube\":true,\"hide_logo\":false,\"border_radius\":0,\"caption_style\":\"\",\"caption_background\":\"\",\"is_locked\":true,\"cta\":[\"\"],\"watermark\":[\"\"],\"search\":[\"\"],\"email_collection\":[\"\"],\"action_bar\":{\"enabled\":true,\"percentage_start\":0,\"text\":\"Subscribe To Our YouTube Channel\",\"background_color\":\"#1d1d1d\",\"button_type\":\"youtube\",\"button_count\":false},\"created_by\":1,\"created_at\":\"2023-04-25 14:24:23\",\"updated_at\":\"2023-04-25 14:24:23\",\"deleted_at\":\"\",\"show_time_elapsed\":false};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.chapters = [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.overlays = [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.tracks = [];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.branding = {\"logo\":\"\",\"color\":\"#00b3ff\",\"logo_width\":150,\"player_css\":\"\"};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.blockAttributes = {\"playsInline\":true,\"id\":2,\"src\":\"https:\\\/\\\/www.youtube.com\\\/watch?v=IXWdGVhGCpE&ab_channel=theoptimizer.io\",\"preset\":5,\"video_id\":\"IXWdGVhGCpE\",\"visibility\":\"public\",\"color\":\"#00b3ff\",\"mutedPreview\":{\"enabled\":false,\"captions\":false},\"mutedOverlay\":{\"enabled\":false,\"src\":\"\",\"width\":200,\"focalPoint\":{\"x\":0.5,\"y\":0.5}},\"mutedOverlayType\":\"text\",\"mutedOverlayText\":\"Click to play\",\"mutedOverlayImageWidth\":200,\"chapters\":[],\"overlays\":[],\"tracks\":[],\"title\":\"How to connect Google Analytics to TikTok?\"};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.skin = \"modern\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.analytics = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.automations = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.provider = \"youtube\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.video_id = 2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.provider_video_id = \"IXWdGVhGCpE\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.youtube = {\"noCookie\":false,\"channelId\":\"https:\\\/\\\/www.youtube.com\\\/@theoptimizerio\",\"show_count\":false};\n\t\t\t\t\t\t\t\t\t<\/script>\n\t\t<\/div>\n\r\n\r\n\r\n<p>If you use Google Analytics to track website visitors, purchases, page views etc, you can easily connect it to TheOptimizer to get full access to your data.<\/p>\r\n\r\n\r\n\r\n<p><strong>Step 1<\/strong>: Under <strong>Account Wizard<\/strong>, select one or multiple connected TikTok ad accounts to connect to Google Analytics. Click on Next.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" class=\"wp-image-1476\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2024\/10\/tiktok-x-ga-start-1024x458-min.png\" alt=\"\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Step 2: <\/strong>On the next screen, you can click on &#8220;<strong>Add new<\/strong>&#8220;. You will see the tab below, where you can choose Google Analytics 4 from the drop-down list, and select a nickname for your account. After you click on Save, you will be redirected to your Google login page where you need to give TheOptimizer access to your account.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" class=\"wp-image-1477\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-1024x550.png\" alt=\"\" srcset=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-1024x550.png 1024w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-300x161.png 300w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-768x412.png 768w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-50x27.png 50w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-1536x824.png 1536w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-2048x1099.png 2048w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-60x32.png 60w, https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2023\/11\/tiktok-x-ga-tracking-100x54.png 100w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\r\n\r\n\r\n\r\n<p><strong>Step 3:<\/strong> Input your login details, then, click &#8220;<strong>Allow<\/strong>&#8221; to grant TheOptimizer access to your Google Analytics account. After completing the authorization, you&#8217;ll be taken back to the Account Wizard page, where the newly added Google Analytics 4 account will be pre-selected. Click &#8220;<strong>Next<\/strong>&#8221; to complete the setup.<\/p>\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" class=\"wp-image-1478\" style=\"width: 400px;\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2024\/10\/Connect-GA4-with-Facebook-P2-1-757x1024-min.png\" alt=\"\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n<p><strong>Step 4:<\/strong> Now that you have connected both your TikTok and Google Analytics accounts, you are ready to link the two platforms so we can match the data from your traffic source and tracker on TheOptimizer. Click on &#8220;<strong>Add Analytics Property<\/strong>&#8221; to proceed.<\/p>\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" class=\"wp-image-1479\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2024\/10\/tiktok-x-ga4-P1-1024x391-min.png\" alt=\"\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n<p><strong>Step 5:<\/strong> After choosing the <strong>account<\/strong> and <strong>property<\/strong>, you need to specify the Google Analytics 4 <strong>metrics<\/strong> you would like TheOptimizer to import (you can add up to 60 metrics &amp; some metrics are pre-selected) and state which UTM parameters you are using to track your <strong>TikTok campaign ID<\/strong>, <strong>ad group ID<\/strong> (AID), and <strong>ad ID<\/strong> (CID). Click on <strong>Add<\/strong> to finalize the process.<\/p>\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" class=\"wp-image-1480\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2024\/10\/tiktok-x-ga4-P2-1024x860-min.png\" alt=\"\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n<p>\ud83d\udca1<strong>NOTE<\/strong>: Make sure to update your TikTok campaigns so that they include this tracking code:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">utm_campaign=__CAMPAIGN_ID__&amp;utm_source=__AID__&amp;utm_medium=__CID__<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">When to use custom tracking?<\/h2>\r\n\r\n\r\n\r\n<p>If you do not have all the above-mentioned utm parameters available, you can enable and use our custom tracking option.<\/p>\r\n\r\n\r\n\r\n<p>With <strong>Custom Tracking<\/strong>, you can pass more than one traffic source macro on a single GA4 parameter. For example, you can pass all TikTok macros on utm_content, shown in the screenshot below:<\/p>\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" class=\"wp-image-1503\" src=\"https:\/\/theoptimizer.io\/help\/wp-content\/uploads\/2024\/10\/tiktok-x-ga4-P3-1024x857-min.png\" alt=\"\" \/><\/figure>\r\n<\/div>\r\n\r\n\r\n<p>Click on\u00a0<strong>Add<\/strong>, then\u00a0<strong>Finish<\/strong>\u00a0to finalize the process. Now, TheOptimizer will be able to track &amp; report data from your linked TikTok and GA accounts.<\/p>\r\n\r\n\r\n\r\n<p>\ud83d\udca1<strong>NOTE:<\/strong>\u00a0Make sure to update your TikTok campaigns so that they include this tracking code:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">utm_content=__CAMPAIGN_ID__|__AID__|__CID__<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Next step: Explore TikTok Automation Rules<\/h2>\r\n\r\n\r\n\r\n<p>Click\u00a0<a href=\"https:\/\/theoptimizer.io\/help\/article-categories\/5-how-to-set-up-automation-rules-for-tiktok-with-examples\/\">here<\/a>\u00a0to learn more about TikTok automation and check out rule examples.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Follow this step-by-step guide to connect Google Analytics for your TikTok campaigns. <\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[46],"ht-kb-tag":[],"class_list":["post-1475","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-3-how-to-connect-tiktok-to-an-external-revenue-stream"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/1475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/comments?post=1475"}],"version-history":[{"count":11,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/1475\/revisions"}],"predecessor-version":[{"id":2231,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb\/1475\/revisions\/2231"}],"wp:attachment":[{"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/media?parent=1475"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb-category?post=1475"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/theoptimizer.io\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}