The default server-side tagging deployment is hosted on an App Engine domain. We recommend that you modify the deployment to use a subdomain of your website instead.
Map a subdomain to your app
- In the Google Cloud Console, navigate to App Engine >
Settings > Custom
Domains. Make sure you’re in the project that matches your
- Click Add a custom domain.
- If your domain is already verified, you may select it from the Select the domain you want to use section. Otherwise, select Verify a new domain from the drop-down menu. If you haven’t verified your domain, do the following:
- Enter your
subdomain (such as
metrics.example.com) and click Verify. A new Webmaster Central window will appear.
- To verify your ownership of your subdomain, follow the steps as prompted in Webmaster Central.
- After you complete the steps in Webmaster Central, close the window and return to the Add a new custom domain page in Google Cloud Console. You may need to click Refresh domains to see your newly verified domain.
- In the Point your domain to [project-ID]
section, remove the
www.prefixed subdomain and Save mappings.
Update DNS records at your domain registrar
After you've mapped your service to a custom domain in App Engine, update the DNS records at your domain registrar. As a convenience, App Engine generates and displays the DNS records you need to enter.
- To retrieve the DNS record information for your domain mappings, open the Custom Domains tab in Google Cloud Console. This page lists DNS records for all of the domains you have mapped to your app.
- Log in to your account at your domain registrar and open the DNS configuration page.
- Locate the host records section of your domain’s configuration page
and add each of the DNS records that you retrieved when you mapped your
domain to your app. Enter the following information in the record
- Record type: Enter the record type shown in the DNS record that Google created for you (A and AAAA).
- Record name: For A and AAAA records, enter the subdomain you registered. For example, enter “metrics” to map metrics.example.com.
- Data: Enter the record data (rrdata) that is shown
in the DNS record Google created for you. For A or AAAA records, the
record data is an IP address. If there is a CNAME record shown in
addition to the A and AAAA records, do not map the CNAME record.
- Save your changes in the DNS configuration page of your domain’s
account. In most cases, it takes only a few minutes for these changes to
take effect, but in some cases it can take several hours. You can use dig to confirm
the DNS records have been successfully updated.
- To test your subdomain, navigate to your server-side Tag Manager container under Admin > Container Settings. and paste that URL into the Server container URL. Click Save, navigate back to your workspace, then click Preview. You should see the Debug panel pop up.