isanalyticsoff Element

Each HTML page served by B2C Commerce includes a JavaScript snippet for analytics and active merchandising tracking purposes. If you must disable this tracking because it causes problems with your site, do so for the entire site by entering a Customer Support ticket, or include the <isanalyticsoff/> element at the end of one or more templates to disable analytics at the page level.

Syntax 

1<isanalyticsoff/>

Purpose 

Use this element only for single pages and only for an emergency situation. Although the element is part of the API, it can prevent the correct tracking of analytics and active merchandising data.

Important

Example 

This is an example of a JavaScript snippet added to the end of a template to collect B2C Commerce analytics:

1<!-- B2C Commerce Analytics code 1.0 -->
2<script type="text/javascript"
3 src="/on/demandware.static/Sites-BV-Site/-/default/v1315220487813/internal/jscript/dwanalytics.js">
4</script>
5<script type="text/javascript">
6//
7<!-- /* <![CDATA[ */
8 try{ var trackingUrl = "http://us.dv.dev1.our.customer.bestcustomer.it/on/demandware.store/Sites-BV-Site/default/__Analytics-Tracking";
9 var dwAnalytics = dw.__dwAnalytics.getTracker(trackingUrl);
10 if (typeof dw.ac == "undefined") { dwAnalytics.trackPageView();
11 } else { dw.ac.setDWAnalytics(dwAnalytics);
12 } }catch(err) {}; /* ]]> */ // --> </script>
13 <isanalyticsoff/>

In this case, the tracking code is considered a cross-site scripting threat if you use an HTTPS iframe and generate this iframe via ISML. Add the <isanalyticsoff/> element at the end of one or more templates to disable B2C Commerce analytics at the page level, thereby preventing the threat.