yes it does.jcgadgets wrote:Do you know if the PayPal Standard module has this set automatically?Xsecrets wrote:index.php?route=common/success most of the gateways will set this for you automatically.Brocberry wrote:For those of us who send our customers to off-site to make payment, we need to give the gateway a page to send the customer back to once the transaction is complete... and then we tell GA which that page is I think. What page can we send the customer back to in OC for GA to recognise a complete transaction?
Thank you,
Jared
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I think either one will work if you can figure them out since both seem to be very disjointed. Honestly google analytics with ecom support really should be put in the core. I mean seriously this is a shopping cart if you are going to bother providing analytics support in the core why wouldn't you add the ecommerce part since that should pretty much always be the main purpose of an opencart install.jcgadgets wrote:I also wanted to see if what we have concluded here coincides with what others have come up in this thread?:
http://forum.opencart.com/viewtopic.php ... ilit=ecomm
Or if perhaps we can get some ideas from there. Which modification method is "better"?
Thank you,
Jared
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
- Couldn't agree more! Couldn't have said it better. Very odd really, why it's not in the core. I wonder if it's planned for 1.5.0...Xsecrets wrote: ...Honestly google analytics with ecom support really should be put in the core. I mean seriously this is a shopping cart if you are going to bother providing analytics support in the core why wouldn't you add the ecommerce part since that should pretty much always be the main purpose of an opencart install.
I guess I will just stick to this one, as this is the one I've already implemented. I'll watch and see if the next sale is captured (my site has only been live for just under a month, so the sales are coming in slowly as per nearly non-existent search rankings at the moment).
Thanks for the PayPal answer too
Thank you,
Jared
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Thanks
Justin
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Be sure to read the installation instructions (install.txt) prior to use or it won't work.
Thanks for the code justinv
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
EDIT: the SKU seems to be the product_id (from the DB) so they don't need to be set manually in Admin.
One thing that I am noticing with my test transactions is that in GA, under E-Commerce, "Categories" is reporting the "Product Categories" as the model number of product/s, not the actual category.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
I just wanted to report that, unfortunately, this does not seem to be working for me I'm quite certain I implemented everything correctly, as I asked questions on the things I was not 100% certain about. I got a sale a few days ago, and just checked Google Analytics. Unfortunately, it was not reported there.
I'm going to give that other thread I mentioned a shot and see what happens.
Thank you!
Jared
Create a free product and do some test purchases on it on your site, you should be able to see those come through or notice if there are js errors on the page using web developer toolbar in FF or the little icon bottom left in IE.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Thanks but I'm not sure I understand... that url, is that the real url for opencart and as it happens the same url for most other carts?Xsecrets wrote:index.php?route=common/success most of the gateways will set this for you automatically.Brocberry wrote:For those of us who send our customers off-site to make payment, we need to give the gateway a page to send the customer back to once the transaction is complete... and then we tell GA which that page is I think. What page can we send the customer back to in OC for GA to recognise a complete transaction?
Two questions, if I may:
(1) Does this require the GA module to be installed (if GA code has been added to header.tpl manually)?
(2) Does the async GA snippet go before or after "<?php echo $google_analytics; ?>"?
NB: I have been tracking OpenCart via GA for some time (using the include method in the body tag) and have since switched to the async GA method, placing the code (below) in the header.tpl. I have never installed the GA module supplied with OpenCart's, however -I added the code myself. I was wondering then, if this would work for me or if someone could explain what the '<?php echo $google_analytics; ?>' code does?
Excerpt from my header.tpl (account number removed):
Code: Select all
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxx-xx']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<?php echo $google_analytics; ?>
</head>
Gary
The GA module gives you a text area in your admin where you can put your GA code from Google.
The echo $google_analytics; code puts whatever you put in admin onto your page. So putting your async GA code directly in the header.tpl is the same as enabling the GA module and putting the async GA code into your admin text area. Apart from by default, the echo $google_analytics; is in the footer, so on a default install it would go before the closing </body> tag.
In summary you should do one or the other - either enable the GA module, or paste your code directly into your header. Enabling the module would be preferable, as it's better to play by the rules.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
I can't quite get this working. I have updated the relevant pages (1) footer.php, (2) header.php, (3) success.php, (4) order.php, (5) footer.tpl, (6) header.tpl and (7) success.tpl -but to no avail. Specifically, the Google Ecommerce tracking script does not appear in the source code upon Order Confirmation (success) page.
I am testing my site using 'Cash on delivery' payment method -that shouldn't cause any problems -should it?
Additionally, I would rather not use the vqMod as my files are already modified. At this point I'd appreciate any advice -I can't see what is wrong. My only clue is that Dreamweaver tells me there is a problem with the code syntax on the following lines:
Code: Select all
'<?php echo $orderDetails['order_id']; ?>',
...
'<?php echo $orderDetails['total']; ?>',
Best regards,
Gary
PS,
Justinv -you may want to add to the first post, that the success.tpl code should be added before the '<?php echo $footer; ?>' code. Currently it doesn't specify where to insert the code.
EDIT-
Justin, your code for success.tpl, may I ask why you used this Asynchronous code in the body and not the header, or why did you not use the 'Traditional' code as per Google's own Ecommerce example code? It is my understanding that Async code (that you have kindly provided) is intended for the <head></head> tags -not to be included in the <body></body> tags -as the Traditional code is.
Code: Select all
<?php foreach($orderProducts as $product) { ?>
_gaq.push(['_addItem',
"<?php echo $product['order_id']; ?>",
"<?php echo $product['product_id']; ?>",
<?php echo json_encode($product['name']); ?>,
"<?php echo $product['model']; ?>",
"<?php echo $product['price']+($product['price']*$product['tax']/100); ?>",
"<?php echo $product['quantity']; ?>"
]);
<? } ?>
Code: Select all
<?php } ?>
Please advise.
STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/
I am still experiencing the same issues: no e-commerce tracking code on the success page nor results in Google Analytics.
Also interesting what Stonehinged pointed regarding the closing tag, can anyone else confirm?
All the best
STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/
STONEHINGED
Handcrafted, Semi-Precious Jewelry
http://www.stonehinged.com/
Nice idea, I had suspected the IF statement but hadn't thought of adding an ELSE statement to help us debug, kudos! I will try some debugging myself on this tangent and report back.
PS, did you try the VQ Mod or did you install manually?
Users browsing this forum: No registered users and 49 guests