Set up and configure Google Tag Manager as a destination in RudderStack.
3 minute read
This guide will help you set up Google Tag Manager as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to Google Tag Manager.
In the web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Google Tag Manager native SDK from the https://www.googletagmanager.com/ domain.
Based on your website’s content security policy, you might need to allowlist this domain to load the Google Tag Manager SDK successfully.
Setup
In your RudderStack dashboard, add a source. Then, from the list of destinations, select Google Tag Manager.
Connection settings
The connection settings required to configure Google Tag Manager as a destination in RudderStack are listed below:
Your Tag Manager server container URL. Use this setting when you want RudderStack to load the Tag Manager scripts from your specified server container URL instead of Google’s domain (https://www.googletagmanager.com/).
You can load Google Tag Manager on any page where you initialize the RudderStack snippet and call the page event.
Load RudderStack as a custom HTML tag
You can also load RudderStack as a custom tag in Google Tag Manager. However, loading Google Tag Manager through RudderStack is recommended, by following the steps described in the above section.
The following image demonstrates how you can add RudderStack as a custom HTML tag which can then be called through Google Tag Manager:
You can find your Tag Manager container ID in the admin section of your GTM dashboard. It is present in the format GTM-XXXXXXX.
Where can I find the server container URL?
Click your server container and go to the Admin tab.
Click Container Settings. You can find the container URL listed here.
I am getting a 404 error when using Google Tag Manager. What should I do?
If you are getting a 404 error on the JavaScript console of your web page related to the Google Tag Manager, verify if you have published your Google Tag Manager Container. Follow this guide for more information.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.