Reputation: 1613
For ecommerce tracking in VirtueMart (Joomla Extension, latest versions), except using Google's, I also have to use a tracking code of a local company.
Their code is an iframe like this
<iframe src="http://...v=<?php echo $total; ?>"></iframe>
This code is on the "thank you page" of VirtueMart to track order information.
If you refresh the thank you page, you're redirected back to the homepage. But if you left the "thank you page" and then went back in your browser history, you'd get to the thank you page again and the iframe would get executed again - at least that's what I think is the reason that some orders are tracked twice.
Is there any simple solution to this issue?
Upvotes: 0
Views: 1731
Reputation: 2767
Add the iframe dynamically either using javascript or php so that it only shows if someone has gone there directly.
Here's how to detect if someone has landed on a page via the back button...
How do I detect if a user has got to a page using the back button?
If they have, don't show the iframe.
Upvotes: 1