isanalyticsoff Element

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




Important: Use this element only for single pages and only for an emergency situation. Although it's part of the API, Commerce Cloud strongly suggests you consider the ramifications of using it because it prevents the correct tracking of analytics and active merchandising data.


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

<!-- B2C Commerce Analytics code 1.0 -->
<script type="text/javascript"
<script type="text/javascript">
<!-- /* <![CDATA[ */
 try{ var trackingUrl = "";
 var dwAnalytics = dw.__dwAnalytics.getTracker(trackingUrl);
 if (typeof == "undefined") { dwAnalytics.trackPageView();
 } else {;
 } }catch(err) {}; /* ]]> */ // --> </script>

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. You can 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.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.