View Single Post
  #1  
Old 02-27-2013, 08:12 AM
 
andrewmattress andrewmattress is offline
 

Advanced Member
  
Join Date: Feb 2013
Posts: 39
 

Default XCart removing code from script. How to get code on page?

I would like to add code (below) to the <head>.

I've tried putting it directly into the page home.tpl. It shows in the template editor, but XCart removes part of the code when loading the page.

I've tried calling it as a separate .tpl (template) file into the page. Xcart removes part of the code when loading the page.

I've tried putting it into the common.js file. The code doesn't load.

I've tried building a new HTML page, pulling that HTML page into the template in a 1x1 iframe. The frame and code loads, but then doesn't do the tracking I want it to because it's loading in a frame.

No matter what I do, XCart is removing everything between

{
and
}

the code that I've highlighted in Dark Green below.

How do I get this full code to show up on the page inside of <head></head> and get XCart to leave it alone?

Thank-you!

Andrew
http://www.MattressInsider.com



Here is the full code (with our ID changed to X's):

<!-- Begin SpringMetrics -->

<script type='text/javascript'>
var _springMetq = _springMetq || [];
_springMetq.push(['id', 'XXXXXXXXXX']);
(
function(){
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = ('https:' == document.location.protocol ? 'https://d3rmnwi2tssrfx.cloudfront.net/a.js' : 'http://static.springmetrics.com/a.js');
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}

)();
</script>
<!-- End SpringMetrics -->
__________________
JK
X-Cart version 4.7
We have about lots of add-on modules.
Reply With Quote