0

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?

TeeJay
  • 1,593
  • 3
  • 21
  • 33

1 Answers1

1

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.

Community
  • 1
  • 1
RichardB
  • 2,615
  • 1
  • 11
  • 14
  • Thank you, I'll try that and will see if it works as I think it could. – TeeJay Jun 26 '14 at 19:10
  • You were right :) I just had to find a different way to detect if someone lands on the page via the back button. Answers here http://stackoverflow.com/questions/829046/how-do-i-detect-if-a-user-has-got-to-a-page-using-the-back-button and here http://stackoverflow.com/questions/4869721/reload-browser-window-after-post-without-prompting-user-to-resend-post-data helped me the most. – TeeJay Jul 01 '14 at 09:44