Skip to main content

Server-Side Tagging Url

How to Set Up Server-Side Tagging URL with Google Tag Manager and Stape

1. Setting Up Server-Side Container in GTM

Follow these steps to configure your sGTM container using Stape:

  1. Create a Server Container in Google Tag Manager.
  2. Go to Google Tag Manager.
  3. In the Admin section, click on the + under the Container column.
  4. Name your container, select Server as the type, and click Create.
  5. Choose Manually provision tagging server.
  6. Copy your Container Config as we will need it for the next steps.

2. Set Up Your Server Container on Stape

  1. Visit Stape.io and log in or create an account.
  2. Click Create Container at the top right.
  3. Fill in the required details:
  4. Container Name (this doesn’t need to match your sGTM container name).
  5. Container Configuration: Paste the config you copied from Google Tag Manager.
  6. Server Location: Choose a location close to your primary audience (this cannot be changed later).
  7. Click Create Container.

3. Select a Plan and Deploy

  1. Choose a plan—start with the Free plan if you’re testing or just beginning.
  2. Click Continue with Free plan.

4. Verify Deployment

  1. Once set up, you’ll see your container’s status, configuration, and plan details.
  2. Deployment typically takes about 5 minutes.
  3. Refresh the page to check the status—if everything is set up correctly, the status should show “Running”.

Recommended: Set Up a Custom Domain for Server-Side Tagging

To enhance your server-side tracking, it's recommended to set up a custom domain for your Google Tag Manager Server container. Using a custom tagging server URL helps establish first-party cookies, improving tracking accuracy. Example: If your website domain is example.com, your custom tagging server URL should be something like ss.example.com.

Custom Domain Setup Options

1 How to Set Up a Custom Subdomain

  1. Add a Custom Domain in Stape
  2. Log in to your Stape account.
  3. Select your container, scroll down, and click Add Custom Domain.

2. Connect Your Custom Domain

Manually

  • After adding your custom domain in Stape, DNS records will be generated for verification.
  • The required DNS records depend on your server location and chosen CDN option:
  • CDN Options: Disable CDN: No CDN will be used.
  • Stape Global CDN: Automatically serves scripts from servers closest to your users.
  • Own CDN: Routes traffic through your website’s DNS provider. This option matches the IP address of your website and sGTM custom domain, allowing - first-party cookies with extended durations.

Adding a Custom Domain with a CNAME Record

  • Adding a custom domain with a CNAME record.

    1. You must create one CNAME record if you do not use Global CDN. You must create two CNAME records if you use Global CDN.

    2. Once your custom domain is verified, you should see the status ready below the tagging server URL in the Stape admin. If there are any problems with verifying a custom domain, please follow this guide on troubleshooting a custom domain.

    3. Go to your Google Tag Manager Server container -> Admin -> Container Settings -> Add the URL in Server container URLs

Need Help?

If you encounter any issues during the setup process or need assistance configuring the server-side tagging Url, our support team is here to help. Reach out to us at support@webgarh.co.in for prompt assistance.