Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Google Universal Analytics
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 03 2014 :  08:54:22  Show Profile  Reply with Quote
Hi all

Has anyone upgraded their VPASP 7 to the new tracking code using universal instead of ga.js?
All my properties have been successfully upgraded and all its needed is the new code.
I know the code is within shopproductsub.asp but I''m not 100% how can be done since VPASP generates parts of the code dynamically.

Thanks

PD


pdieppa
VP-CART New User

USA
86 Posts

Posted - May 03 2014 :  09:54:33  Show Profile  Reply with Quote
So, I took the chance and updated the code and seems to be working Ok.

This is how the new code looks now:

>
(function(i,s,o,g,r,a,m){i[''GoogleAnalyticsObject'']=r;i[r]=i[r]|function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,''script'',''//www.google-analytics.com/analytics'',''ga'');

ga(''create'', ''<%=getconfig("xurchinacctno")%>'', ''mydomaingoeshere.com'');
ga(''require'', ''displayfeatures'');
ga(''send'', ''pageview'');

</script>


Here is the old code:

<script language="javascript" type="text/javascript">
<!
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=''" + gaJsHost + "google-analytics.com/ga.js'' type=''text/javascript''%3E%3C/script%3E"));
-->
</script>
<script language="javascript" type="text/javascript">
<!--
var pageTracker = _gat._getTracker("<%=getconfig("xurchinacctno")%>");
pageTracker._initData();
pageTracker._trackPageview();

Also, you need to delete one extra </script> tag at around line 2606+- because the new script only has one <script> vs the old one having two. The old script starts around line 2588+-

Good luck!!!
Go to Top of Page

pdieppa
VP-CART New User

USA
86 Posts

Posted - May 03 2014 :  18:30:23  Show Profile  Reply with Quote
How about some help updating the ecommerce part?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00