How to pass GTM tags in gatsby-plugin-google-tagmanager plugin conditionally in the gatsby-config file ? #33466
Unanswered
yashvekaria
asked this question in
Help
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using a gatsby-plugin-google-tagmanager plugin for analytics of my site, but later I create another site from the same code base (differentiate its branding based on specific routes), for that, I need to add another GTM tag into my plugin. Now I believe I cannot add any conditions in the gatsby-config file (Please correct me if I am wrong), then How do handle this case ? Do I need to add insert script manually using the gatsby-SSR function or is there any other way to resolve it?
I am passing gtm tag as per my build environment via process.env
Beta Was this translation helpful? Give feedback.
All reactions