Google ¸ú×Ù´úÂëÖÎÀíÆ÷
Google ¸ú×Ù´úÂëÖÎÀíÆ÷
Google Tag Manager ½öÊÊÓÃÓÚʹÓà Shopify Plus Ìײ͵ÄÊÐËÁ¡£¡£¡£¡£¡£Shopify Plus
±¾Ò³Ïà¹ØÖ÷Ìâ
ʹÓà Google Tag Manager µÄ×¢ÖØÊÂÏî
½« Google ¸ú×Ù´úÂëÖÎÀíÆ÷´úÂëÌí¼Óµ½ÄúµÄÄ£°åÖÐ
ÑéÖ¤ÊÇ·ñÒÑ×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷
Ïà¹ØÁ´½Ó
ʹÓà Google Tag Manager µÄ×¢ÖØÊÂÏî
ÈôÒª¶Ô Shopify Plus µÄÔÚÏßÊÐËÁʹÓà Google Tag Manager£¬£¬£¬£¬£¬ÇëÖ´ÐÐÒÔϲÙ×÷£º
ÓµÓÐ
checkout.liquidÎļþµÄ»á¼ûȨÏÞ¡£¡£¡£¡£¡£ÈôÊÇÄúÎÞȨÔÚÄ£°å´úÂëÖлá¼û´ËÎļþ£¬£¬£¬£¬£¬ÇëÁªÏµ Shopify Plus Ö§³Ö»ñÈ¡»á¼ûȨÏÞ¡£¡£¡£¡£¡£½« Shopify µÄ¼¯³ÉÓÃÓÚ Google Analytics ºÍ Facebook Pixel£¬£¬£¬£¬£¬¶ø²»Êǽ«ÆäÓÃÓÚ Google ¸ú×Ù´úÂëÖÎÀíÆ÷¡£¡£¡£¡£¡£
½« Google Tag Manager ÌṩµÄ´úÂëÆ¬¶Ï¸´ÖƵ½ÄúµÄ
theme.liquidºÍcheckout.liquidÄ£°åÎļþÖС£¡£¡£¡£¡£
½« Google ¸ú×Ù´úÂëÖÎÀíÆ÷´úÂëÌí¼Óµ½ÄúµÄÄ£°åÖÐ
°ì·¨£º
×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷ ÒÔ»ñÈ¡ÄúÐèÒª¸´ÖƲ¢Õ³Ìùµ½ Shopify ÊÐËÁÖеĴúÂëÆ¬¶Ï¡£¡£¡£¡£¡£ÓÉÓÚ Shopify ʹÓÃÄ£°å£¬£¬£¬£¬£¬Òò´ËÄúÖ»Ð轫´úÂëÆ¬¶Ï¸´ÖƵ½
theme.liquidºÍcheckout.liquidÎļþ¡£¡£¡£¡£¡£ÈôÊÇÕâÊÇÄúÊ×´Î×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷£¬£¬£¬£¬£¬ÇëʹÓà Google ¸ú×Ù´úÂëÖÎÀíÆ÷ÌṩµÄ×°Öð취¡£¡£¡£¡£¡£ÔÚÄú»ñµÃÒªÏòÍøÒ³Ìí¼ÓµÄÁ½¸ö´úÂëÆ¬¶ÏµÄ°ì·¨Ê±ÔÝÍ££¬£¬£¬£¬£¬È»ºóƾ֤ÒÔÏÂ˵Ã÷²Ù×÷¡£¡£¡£¡£¡£
ÈôÊÇÄúÒÑ×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷£¬£¬£¬£¬£¬Ôò¿Éͨ¹ýÒÀ´Îµã»÷ºǫ́ºÍ×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷£¬£¬£¬£¬£¬ÔÚ Google ¸ú×Ù´úÂëÖÎÀíÆ÷ÖÐÕÒµ½ÕâЩ´úÂëÆ¬¶Ï¡£¡£¡£¡£¡£
ÔÚ Shopify ºǫ́£¬£¬£¬£¬£¬µã»÷ÔÚÏßÊÐËÁ£¬£¬£¬£¬£¬È»ºóµã»÷Ä£°å¡£¡£¡£¡£¡£
ÔÚÄ£°åÏÂÀ²Ëµ¥ÖУ¬£¬£¬£¬£¬µã»÷±à¼´úÂë¡£¡£¡£¡£¡£
½« Google Tag Manager ÖеĵÚÒ»¸ö´úÂëÆ¬¶Ï¸´ÖƵ½ÄúµÄ
theme.liquidºÍcheckout.liquid´úÂëµÄ<head>±ê¼ÇÖУº¸´ÖÆ Google ¸ú×Ù´úÂëÖÎÀíÆ÷ÖеĵÚÒ»¸ö´úÂëÆ¬¶Ï
ÔÚÄúµÄ Shopify ºǫ́ÖУ¬£¬£¬£¬£¬·¿ª
theme.liquidÎļþ¡£¡£¡£¡£¡£½«´úÂëÆ¬¶ÏÕ³Ìùµ½
theme.liquid´úÂëµÄ<head>Öо¡¿ÉÄܸߵÄλÖᣡ£¡£¡£¡£·¿ªÄúµÄ
checkout.liquidÎļþ¡£¡£¡£¡£¡£½«´úÂëÆ¬¶ÏÕ³Ìùµ½
checkout.liquid´úÂëµÄ<head>Öо¡¿ÉÄܸߵÄλÖᣡ£¡£¡£¡£½« Google ¸ú×Ù´úÂëÖÎÀíÆ÷Öеĵڶþ¸ö´úÂëÆ¬¶Ï¸´ÖƵ½ÄúµÄ
theme.liquidºÍcheckout.liquid´úÂëµÄ<body>±êÇ©£ºÔÚÄúµÄ Shopify ºǫ́£¬£¬£¬£¬£¬·¿ª
theme.liquidÒ³Ãæ¡£¡£¡£¡£¡£½«´úÂëÆ¬¶ÏÕ³Ìùµ½
theme.liquidÒ³ÃæµÄ<body>Öо¡¿ÉÄÜ¿¿Ç°µÄλÖᣡ£¡£¡£¡£·¿ª
checkout.liquidÒ³Ãæ¡£¡£¡£¡£¡£½«´úÂëÆ¬¶ÏÕ³Ìùµ½
checkout.liquid´úÂëµÄ<body>Öо¡¿ÉÄܸߵÄλÖᣡ£¡£¡£¡£ÔÚ Shopify ºǫ́£¬£¬£¬£¬£¬µã»÷ÉúÑÄ¡£¡£¡£¡£¡£
ÔÚ Google Tag Manager ÖУ¬£¬£¬£¬£¬¼ÌÐø×°Öà Google Tag Manager¡£¡£¡£¡£¡£µ±ÏµÍ³ÌáÐÑÄúÌí¼Ó±ê¼Çʱ£¬£¬£¬£¬£¬ÇëÎðÌí¼ÓÒÔÏÂÀàÐ͵ıê¼Ç£º
ÊÊÓÃÓÚ Google Analytics µÄ Universal Analytics
ÊÊÓÃÓÚ Google Analytics µÄ Classic Google Analytics
Facebook Pixel¡£¡£¡£¡£¡£
ÑéÖ¤ÊÇ·ñÒÑ×°Öà Google ¸ú×Ù´úÂëÖÎÀíÆ÷
ÒªÑéÖ¤ÄúÊÇ·ñÒÑ׼ȷװÖà Google ¸ú×Ù´úÂëÖÎÀíÆ÷£¬£¬£¬£¬£¬Äú¿ÉÒÔʹÓãº
Google ¸ú×Ù´úÂëÖÎÀíÆ÷ÖеÄÔ¤ÀÀģʽ
Google Tag Assistant Chrome À©Õ¹¡£¡£¡£¡£¡£
Ïà¹ØÁ´½Ó
theme.liquid
checkout.liquid
Google ¸ú×Ù´úÂëÖÎÀíÆ÷Îĵµ
ÔÚ Shopify ÖÐʹÓà Google Analytics
ÔÚ Shopify ÖÐʹÓà Facebook Pixel
ShopifyÉÌ»§¹ÙÍøÔÎÄÏêÇ飺
Google Tag Manager
Shopify Plus
Google Tag Manager is available only to stores on the Shopify Plus plan.
On this page
Considerations for using Google Tag Manager
Add Google Tag Manager code to your theme
Verify that Google Tag Manager is installed
Related links
Considerations for using Google Tag Manager
To use Google Tag Manager with your Shopify Plus online store, you do the following:
Have access to the
checkout.liquidfile. If you don't have access to this file in your theme code, then contact Shopify Plus Support to gain access.Use Shopify's integration for Google Analytics and Facebook Pixel instead of using them with Google Tag Manager.
Copy the code snippets that are provided by Google Tag Manager into your
theme.liquidandcheckout.liquidtheme files.Add Google Tag Manager code to your theme
Steps:
Install Google Tag Manager to get the code snippets that you will need to copy and paste into your Shopify store. Because Shopify uses templates, you only need to copy the snippets into the
theme.liquidandcheckout.liquidfiles.
If this is your first time installing Google Tag Manager, then use the installation steps provided by Google Tag Manager. Pause at the step where you are given two code snippets to add to your web pages, and then follow the instructions below.
If you have already installed Google Tag Manager, then you can find these code snippets in your Google Tag Manager by clicking Admin, and then clicking Install Google Tag Manager.
In your Shopify admin, click Online store, and then click Themes.
In the theme drop-down, click Edit Code.
Copy the first code snippet from Google Tag Manager into the
<head>tags of yourtheme.liquidandcheckout.liquidcode:
Copy the first code snippet from Google Tag Manager
In your Shopify admin, open your
theme.liquidfile.Paste the code snippet as high in the
<head>of thetheme.liquidcode as possible.Open your
checkout.liquidfile.Paste the code snippet as high in the
<head>of thecheckout.liquidcode as possible.Copy the second code snippet from the Google Tag Manager into the
<body>tags of yourtheme.liquidandcheckout.liquidcode:
In your Shopify admin, open the
theme.liquidpage.Paste the code snippet as high in the
<body>of thetheme.liquidpage as possible.Open the
checkout.liquidpage.Paste the code snippet as high in the
<body>of thecheckout.liquidcode as possible.In your Shopify admin, click Save.
In Google Tag Manager, continue installing the Google Tag Manager. When prompted to add tags, do not add the following types of tags:
Universal Analytics for Google Analytics
Classic Google Analytics for Google Analytics
Facebook Pixel.
Verify that Google Tag Manager is installed
To verify that you installed Google Tag Manager properly, you can use:
the Preview Mode in Google Tag Manager
the Google Tag Assistant Chrome Extension.
Related links
theme.liquid
checkout.liquid
Google Tag Manager documentation
Working with Google Analytics in Shopify
Using Facebook Pixel in Shopify
ÎÄÕÂÄÚÈÝȪԴ£ºShopifyÉÌ»§¹Ù·½ÍøÕ¾