Cloud Retail 태그
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
다음은 Cloud Retail 태그를 클라이언트에서 서버 컨테이너로 이동하려는 개발자를 위한 도움말입니다. Cloud Retail 웹 컨테이너 태그에 대한 자세한 내용은 Google Cloud 문서를 참고하세요.
시작하기 전에
이 가이드에서는 다음 작업이 완료되었다고 가정합니다.
Cloud Retail 태그 설정
Google 태그 관리자를 엽니다.
서버 컨테이너에서 태그 메뉴를 열고 새 태그를 만듭니다.
태그 구성에서 Cloud Retail 태그를 선택합니다.
Cloud Retail 태그 설정:
- API 키에
projects.locations.catalogs.userEvents.collect
메서드를 지원하는 유효한 Cloud Retail API 키를 입력합니다.
- 프로젝트 번호에 Cloud Retail 프로젝트의 Google Cloud 프로젝트 번호를 입력합니다.
- 덮어쓸 필드에서 방문자 ID를 설정합니다.
- 필드 선택기:
visitorId
- 필드 값: GA4 이벤트의 고유 방문자 ID(예: 클라이언트 ID)로 연결되는 변수를 입력합니다.
- 선택 사항: 검색 이벤트를 측정하려면 다음 안내를 따릅니다.
- 필드 선택기:
searchQuery
- 필드 값: 검색어를 추출하는 변수를 입력합니다.
검색 이벤트는 검색 이벤트 쿼리를
view_item_list
에 전송되는 쿼리의 노출수와 결합하여 구성됩니다.
트리거에서 태그가 트리거되어야 하는 시기를 선택합니다. Google 애널리틱스 4 트리거 이벤트와 Cloud Retail 이벤트 간의 매핑에 관해서는 Google Cloud 문서를 참고하세요.
태그의 이름을 지정하고 저장합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-15(UTC)
[null,null,["최종 업데이트: 2024-11-15(UTC)"],[[["\u003cp\u003eThis guide helps developers move the Cloud Retail tag from client-side to a server-side container in Google Tag Manager.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure you have set up a server container, a tagging server, and the data flow between web and server containers in Tag Manager.\u003c/p\u003e\n"],["\u003cp\u003eThe setup involves creating a new Cloud Retail tag in your server container, configuring it with your API key and project details, and mapping it to relevant triggers based on Google Analytics 4 events.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to provide a unique visitor ID and optionally include search queries for enhanced tracking in your Cloud Retail tag configuration.\u003c/p\u003e\n"]]],["Developers moving Cloud Retail tags to a server container should first ensure they have a server container, tagging server, and data flow from web to server containers established. In the server container, create a new Cloud Retail tag, configuring it with a valid API key, project number, and a visitor ID variable (e.g., client ID). Optionally, configure search event measurement using a search query variable. Finally, select appropriate triggers based on GA4 event mappings and save the tag.\n"],null,["# Cloud Retail tag\n\n\u003e This article is for developers who want to move their Cloud Retail tag off\n\u003e of the client and into a server container. Refer to the Google Cloud\n\u003e documentation for the [Cloud Retail web container tag](https://cloud.google.com/retail/docs/record-events#gtm-tag).\n\nBefore you begin\n----------------\n\nThis guide assumes that you have done the following:\n\n- [Set up a server container in Tag Manager](/tag-platform/tag-manager/server-side/overview#create_a_tag_manager_server_container)\n- [Set up a tagging server](/tag-platform/tag-manager/server-side/overview#set_up_a_tagging_server)\n- [Set up the data flow from the web container to the server container](/tag-platform/tag-manager/server-side/send-data)\n\nSet up the Cloud Retail tag\n---------------------------\n\n1. [Open Google Tag Manager](https://tagmanager.google.com/)\n\n2. In your server container, open the **Tags** menu and create a **New** tag.\n\n3. In **Tag Configuration** , select the **Cloud Retail** tag.\n\n4. Set up the Cloud Retail tag:\n\n - Under **API Key** , enter a valid Cloud Retail API key that supports the [`projects.locations.catalogs.userEvents.collect` method](https://cloud.google.com/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents/collect).\n - Under **Project Number**, enter the Google Cloud Project number for your Cloud Retail project.\n - Under **Fields to Overwrite** , set up a visitor ID:\n - **Field Selector** : `visitorId`\n - **Field Value**: Enter a variable that resolves into a unique visitor ID from a GA4 event, for example, the client ID.\n - Optional: To measure search events:\n - **Field Selector** : `searchQuery`\n - **Field Value** : Enter a variable that extracts the search query. The search event is constructed by combining the search event query with the impressions for the query, which are sent in `view_item_list`.\n5. In **Triggering** , select when the tag should trigger. Refer to the Google\n Cloud documentation for [mappings between Google Analytics 4 trigger events\n and Cloud Retail events](https://cloud.google.com/retail/docs/record-events#ee-triggers).\n\n6. Name and **Save** your tag."]]