Start a new topic

Google Tag Manager

Hi,


I need some advice. Right now I have included Google Tag Manager as a snippet.

Works fine, but I can't have different GTM ids for different environments (dev,test,prod).

Ideally I would want the Id to come from app settings in web.config.

Anyone have any idea on how to achieve this?

1 Comment

I see there is a Google Ecommerce Analytics module. Can I install that to get to the id using the below code? Then I can continue to use my own snippet and datalayer pushes, and not bring in your snippet that comes with the module.

{{ shop.metafields.settings['GoogleEcommerceAnalytics.GoogleTagManagerId'] }}
Login or Signup to post a comment