Reputation: 1
I am quite new to Sitefinity and not sure if the current way of configuration is correct.
I need to add a custom GA script which is different for my staging env and production environment.
My current implementation is that I have created a custom WebsiteTemplate -> MyProject -> App_Master -> MyProject.Master
And Inside the master I placed my GA scripts (both staging and production - with one commented off) at the end of tag. During deployment I need to un-comment the one that I am planning to use. Is there any better way to implement this solution? Where I can change the parameters based on environment and just specify the deployment environment for it to build with the correct values.
Any help would be much appreciated.
Upvotes: 0
Views: 35
Reputation: 3793
Another way of doing it is by way of adding the Embed Code widget on the page template. It is in the toolbox under Scripts and Styles section.
This way you can configure the widget differently on the different environments.
If, in the future, you restore the prod database to staging environment, then you have to remember to go and change this widget.
Upvotes: 1