Describe the bug
Currently, GTM tags (and all other tags) are rendered when a web page is viewed in the Page Builder or Preview in Xperience.
This has the following effects
Tags that are meant for customers-only (ex: GTM/GA4/Clarity) are executed as marketers customize and preview a page
Pages that record the URL (ex: GA4) will capture administration-only URLs (ex: /cmsctx/pm/...)
Tags that expect all areas of the page to be "ready" when the tag loads will not work correctly because the Page Builder loads components asynchronously
To Reproduce
Steps to reproduce the behavior:
Add a GTM/GA4 tag to a website channel
View that site in the Page Builder/Preview
See that the GTM/GA4 tag is executing
Expected behavior
Sometimes the tag does something that is expected to always happen, even in the Page Builder, but other times (as explained above) it isn't correct.
Marketers should be able to opt-out of a tag rendering in either Page Builder, Preview, or both.
GA4 and GTM tags (and probably most others) should default to not rendering in the Page Builder or Preview.
Screenshots
Testing GA4 with the Tag Manager integration results in GA4 reports like this
Describe the bug Currently, GTM tags (and all other tags) are rendered when a web page is viewed in the Page Builder or Preview in Xperience.
This has the following effects
/cmsctx/pm/...
)To Reproduce Steps to reproduce the behavior:
Expected behavior Sometimes the tag does something that is expected to always happen, even in the Page Builder, but other times (as explained above) it isn't correct.
Marketers should be able to opt-out of a tag rendering in either Page Builder, Preview, or both. GA4 and GTM tags (and probably most others) should default to not rendering in the Page Builder or Preview.
Screenshots Testing GA4 with the Tag Manager integration results in GA4 reports like this![image](https://github.com/Kentico/xperience-by-kentico-tag-manager/assets/1382768/974fea71-c63d-4652-a23d-61627d68f302)
Library Version 2.0.1