gtmIsPreviewMode β GTM Variable Template for GTM
When to Use This
Section titled βWhen to Use ThisβGTM Utilities
Access GTM-specific APIs: dataLayer, debug mode, container settings.
GTM Configuration
Section titled βGTM ConfigurationβThis is what you'll see when you open this variable in Google Tag Manager.
Read-only Preview
gtmIsPreviewMode
This function takes no parameters.
Related Variables
Section titled βRelated VariablesβSame category: GTM
Under the Hood
Section titled βUnder the Hoodβπ View Implementation Code
/** * Checks if the container is in preview mode. * * @returns {boolean} True if the container is running in preview mode, false otherwise. * * @framework ggLowCodeGTMKit */const getContainerVersion = require('getContainerVersion');
return getContainerVersion().previewMode;
___WEB_PERMISSIONS___
[ { "instance": { "key": { "publicId": "read_container_data", "versionId": "1" }, "param": [] }, "isRequired": true }]π§ͺ View Test Scenarios (1 tests)
β
Untitled test 1