> For the complete documentation index, see [llms.txt](https://help.checkoutchamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.checkoutchamp.com/funnel-builder/creating-and-editing-funnels-pages/funnel-visualizer-and-page-builder/funnel-visualizer/edit-funnel-settings/tracking-pixels/server-side-google-tag-manager.md).

# Server-side Google Tag Manager

{% embed url="<https://developers.google.com/tag-platform/tag-manager/server-side>" %}

{% hint style="info" %}
Server-Side e Google Tracking is well-documented at Google.  This guide summarizes the steps.  It is advised to review the Google documentation for the most accurate and up-to-date instructions.
{% endhint %}

1. [**Create a Server-Side Container**](https://developers.google.com/tag-platform/tag-manager/server-side/overview#create_a_tag_manager_server_container)
   * Log in to your [Google Tag Manager](https://tagmanager.google.com/)
   * Click **"Create Container"** → Select **"Server"** as the target platform
   * Name the container and finish creation
2. **Provision a Tagging Server**
   1. **Automatic (Recommended)**
      * Use the GTM UI to [set up on **Google Cloud Run**](https://developers.google.com/tag-platform/tag-manager/server-side/cloud-run-setup-guide?provisioning=manual) automatically
   2. **Manual (Advanced)**
      * Deploy the server container manually using Docker (on [GCP](https://developers.google.com/tag-platform/tag-manager/server-side/app-engine-setup), [Manual](https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide) (AWS, or another host))
      * Example Docker image:\
        `gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable`
3. [**Configure a Custom Domain**](https://developers.google.com/tag-platform/tag-manager/server-side/custom-domain?option=same-origin) **(Recommended) \[optional]**\
   When you first set up a tagging server, it is hosted on a domain provided by the cloud provider. When you use the default endpoint, it delivers data to the server container, but runs in a third-party context. To unlock the benefits of a [first-party context](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies#tracking_and_privacy), such as more durable cookies, your tagging server and your website have to run on the same domain.
   * Use a subdomain like `metrics.yourfunneldomain.com`
   * Update your **DNS records** to point to your tagging server
   * In GTM:\
     **Admin > Container Settings > Add URL** → Add the custom domain
4. **Add Server-Side Tags**
   * Recommended:
     * [**Conversion Linker**](https://developers.google.com/tag-platform/tag-manager/server-side/ads-setup#step_1_set_up_the_conversion_linker_tag) (All Pages)
     * [**Google Ads Conversion Tracking**](https://developers.google.com/tag-platform/tag-manager/server-side/ads-setup#step_1_set_up_the_conversion_linker_tag) tag
   * Input your **Conversion ID and Label** from Google Ads
   * Trigger on appropriate events (e.g., "purchase", "sign\_up")
5. [**Set Up Clients**](https://developers.google.com/tag-platform/tag-manager/server-side/dependency-serving?tag=gtm) **in the Server Container**
   * The **GA4 client** is pre-installed to handle GA4 events
   * If you're using a **GTM Web Container**, add a "GTM Web Container" client and enter your container ID
   * Go to [AnalyticsMania](https://www.analyticsmania.com/post/introduction-to-google-tag-manager-server-side-tagging/), to get an in-depth tutorial
6. **Validate and Test**
   * Use **Tag Assistant** to preview and test your server container
   * Confirm tags are firing correctly
   * Check for any errors in the console
7. **Go Live**
   * Publish the server container
   * Remove any **duplicate tracking tags** from your web container to avoid duplication
8. **Configure CheckoutChamp**
   1. Go to the funnel > Settings > Tracking Pixels
      1. add the custom domain from Step 3, if configured
      2. otherwise, add the GTM generated server URL
         * Default URL format using Cloud Run: `https://[GOOGLE_CLOUD_PLATFORM_PROJECT_ID]-[GOOGLE_CLOUD_REGION_ID].a.run.app`
   2. Save
   3. Publish the funnel

<figure><img src="/files/bhoQeaTZM2orGPsm7TB8" alt="" width="563"><figcaption></figcaption></figure>
