{* Data Layer Variables *}
{* Data Layer Variables End *}
{if $DOC->hasAnalyticsScripts() && $SITE_LIVE}
{assign var = 'type' value = $DOC->getAnalyticsType()}
{if constant('Qs_Doc::ANALYTICS_TYPE_GOOGLE_ANALYTICS') == $type}
{assign var='analyticsCode' value='analyticsCode'|settings|trim|htmlspecialchars}
{if $analyticsCode}
{/if}
{elseif constant('Qs_Doc::ANALYTICS_TYPE_GOOGLE_TAG_MANAGER') == $type}
{assign var='gtmId' value='gtmId'|settings|trim}
{if $gtmId}
{literal}
{/literal}
{/if}
{/if}
{/if}