jen
11/28/2017 - 10:50 PM

Miva_Tracking_Scripts.js

<!-- The following (No <Attributes></Attribute> tag) will result in the default attributes being applied automatically: type="text/javascript" -->
<JavaScriptResource_Add>
                <Code>code_1</Code>
                <Type>InlineScript</Type>
                <Global>No</Global>
                <Active>Yes</Active>
                <Template><![CDATA[alert( 'code_1' );]]></Template>
                <Notes>Original Template</Notes>
</JavaScriptResource_Add>
 
<JavaScriptResourceXPage_Assign code="code_1" page_code="ABUS" />
<JavaScriptResourceXGroup_Assign code="code_1" group_code="head_tag" />
 
<!-- The following will result in no attributes at all, just an empty <script> tag -->
<JavaScriptResource_Add>
                <Code>code_2</Code>
                <Type>InlineScript</Type>
                <Global>No</Global>
                <Active>Yes</Active>
                <Attributes>
                </Attributes>
                <Template><![CDATA[alert( 'code_2' );]]></Template>
                <Notes>Original Template</Notes>
</JavaScriptResource_Add>
 
<JavaScriptResourceXPage_Assign code="code_2" page_code="ABUS" />
<JavaScriptResourceXGroup_Assign code="code_2" group_code="head_tag" />
 
<!-- The following will result in ONLY the included attribute being applied, ie no type="text/javascript" will get added -->
<JavaScriptResource_Add>
                <Code>code_3</Code>
                <Type>InlineScript</Type>
                <Global>No</Global>
                <Active>Yes</Active>
                <Attributes>
                                <Attribute>
                                                <Name><![CDATA[data-brennan]]></Name>
                                                <Value><![CDATA[Testing]]></Value>
                                </Attribute>
                </Attributes>
                <Template><![CDATA[alert( 'code_3' );]]></Template>
                <Notes>Original Template</Notes>
</JavaScriptResource_Add>
 
<JavaScriptResourceXPage_Assign code="code_3" page_code="ABUS" />
<JavaScriptResourceXGroup_Assign code="code_3" group_code="head_tag" />