I’ve got it now exactly as typed here ^/index.php?target=orders&mode=details&order_id=([0-9]+)&confirmation=Y
and after days still nothing?
I cannot seem to get analytics working. I have made all of the changes that have been posted in the forums with no change. Are there any other files that pertain to analytics other than /addons/google_analytics and /skins/brickwork_dark_steel/customer/addons/google_analytics that can be checked?
Google Analytics reports that it is receiving data but nothing is showing in statistics.
Edit: Never mind. It was the -1 at the end of my number. Strange how GA was still saying that it was receiving data?
Here’s what I had to do to get Google Analytics to work -
For reference it’s a good idea to know your exact version number. Use this URL -http://www.URLtoYourShoppingCart /index.php?version
My version is 1.3.5-SP2 and some of this solution is undoubtedly unique to 1.3.5-SP2.
This forum thread contains a lot of useful information. For me it was a matter of figuring out what works for me.
- First follow shockalotti’s post from 5/15/2008 (#15) and put the UA code in Admin > Addons > Google Analytics > Tracking Code and check the box for “Track eCommerce transactionsâ€.
- Second use sholand’s third post from 5/13/2008 (#6) to change tracker.tpl (yourSkin > addon > google_analytics). Don’t change the (* $Id… line, just everything after that.
To get mine to work I had to hard code the reference to pageTracker… so instead of
var pageTracker = _gat._getTracker(“{$settings.Modules.google_analytics_opts.tracking_code}”);
substitute –
var pageTracker = _gat._getTracker(“UA-xxxxxxx-x”);
where I have UA-xxxxxxx-x above use the UA number from step 1.
NOTE: This code is different in a few places from the code you would copy from Google but I found that those changes are necessary and the straight Google code will cause an error on all cart pages. – try (…) errors out and the
- Now use sholand’s first post from 5/13/2008 (#3) to change ADDONS/GOOGLE_ANALYTICS/FUNC.PHP and SKINS/YOUR_SKIN/CUSTOMER/ADDONS/GOOGLE_ANALYTICS/reporter.tpl.
- To test the results go to a page within your cart, choose “view source†and do a FIND on “Googleâ€. That should find the code you inserted in tracker.tpl.
It’s actually simple conceptually – whatever you have in tracker.tpl will be included on every page in main.tpl.
- Once you are sure it is working, look at sholand’s second post from 5/15/2008 (#16) for info on getting the most from Analytics – Goals, Funnels and e-commerce.
My firefox gives the following javascript error:
pageTracker is not defined
And somehow the Adwords conversions aren’t counted, maybe because of the javascript error?
Code:
<script type="text/javascript"><br />
//<![CDATA[<br />
<br />
pageTracker._addTrans(<br />
'200801136', // Order ID<br />
'', // Affiliation<br />
'298.95', // Total<br />
'0', // Tax<br />
'29.95', // Shipping<br />
'Waddinxveen', // City<br />
'Zuid Holland', // State<br />
'Nederland' // Country<br />
);<br />
<br />
pageTracker._addItem(<br />
'200801136', // Order ID<br />
'', // SKU<br />
'26 inch falter fx-600 city stoere jongens fiets.', // Product Name <br />
'26 inch', // Category<br />
'269.00', // Price<br />
'1' // Quantity<br />
);<br />
<br />
pageTracker._trackTrans();<br />
<br />
//]]><br />
</script><br />
<br />
<br />
<br />
<!-- Google Code for Bestelling Conversion Page --><br />
<script type="text/javascript"><br />
<!--<br />
var google_conversion_id = 1027729685;<br />
var google_conversion_language = "nl";<br />
var google_conversion_format = "1";<br />
var google_conversion_color = "ffffff";<br />
var google_conversion_label = "_JgFCK-foAEQldKH6gM";<br />
//--><br />
</script><br />
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"></script><br />
<noscript><br />
<div style="display:inline;"><br />
<img height="1" width="1" style="border-style:none;" alt="" src="upload://ux1zSLp9vBY9KEUw7CSvZVrESee.gif"><br />
</div><br />
</noscript><br />
```<br />
<br />
at the bottom of the page i've got:<br />
<br />
```php
<script type="text/javascript"><br />
//<![CDATA[<br />
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");<br />
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));<br />
//]]><br />
</script><br />
<script type="text/javascript"><br />
//<![CDATA[<br />
var pageTracker = _gat._getTracker("UA-11526647-1");<br />
pageTracker._initData();<br />
pageTracker._trackPageview();<br />
//]]><br />
</script>