{* 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}
{literal}
{/literal}
{/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}