X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Bing conversion code (https://forum.x-cart.com/showthread.php?t=66864)

BritSteve 05-16-2013 09:18 AM

Bing conversion code
 
I am having trouble with the Bing conversion code not working as it should.

This is the code that I have been given by the company that deals with advertising for us. I have removed our account code. This is what is in the template file.

<!-- Bing Code for Purchase Conversion Page -->
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/ce168b15-1b45-479d-8757-18fcec513121/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"xxxxx",type:"1",revenue:"{$or der.order.total}",actionid:"131715"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/ce168b15-1b45-479d-8757-18fcec513121/analytics.html?dedup=1&domainId=xxxxx&type=1&reven ue={$order.order.total}&actionid=131715" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>

When I look at the source code on the thank you page, this is what is in there.

<!-- Bing Code for Purchase Conversion Page -->
<script type="text/javascript"> if (!window.mstag) mstag = ,time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/ce168b15-1b45-479d-8757-18fcec513121/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", ",actionid:"131715"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/ce168b15-1b45-479d-8757-18fcec513121/analytics.html?dedup=1&domainId=xxxx&type=1&revenu e=38.49&actionid=131715" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>

As you can see, there are differences, and the tracking code is not working. Maybe something is changing the code as it is output to the page?

Any ideas?

Thanks,

Steve

Nishant 10-04-2015 08:19 PM

Re: Bing conversion code
 
Hi,

Did you get it right ? the Bing Ad tracking code ?

I am having hard time to figure out the code.

Let me know.

thanks.

seyfin 10-05-2015 03:35 AM

Re: Bing conversion code
 
You should place your code between {literal} and {/literal} tags - it should help to solve the problem.

razortw 10-05-2015 05:04 AM

Re: Bing conversion code
 
This is happening because the Smarty templater interprets { and } symbols as its opening and closing tags.
So you should replace these symbols with {ldelim} and {rdelim} statements where it is necessary, or do like seyfin said, place the entire piece of code between {literal} and {/literal} tags.

masada3336 01-25-2016 02:31 PM

Re: Bing conversion code
 
I can see my conversions, but I'm not getting the revenue variable. This is what I have on my 4.4.5 xcart:
Code:

{literal}
<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"5077822"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script>
<noscript><img src="//bat.bing.com/action/0?ti=5077822&Ver=2" height="0" width="0" style="display:none; visibility: hidden;" /></noscript>
{/literal}


Has anyone gotten Bing Revenue/UET code to work properly?


All times are GMT -8. The time now is 06:51 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.