For users of the TourCMS tour operator ecommerce platform
Hi,
I have followed the analytics guide and added an onclick attribute with the value _gaq.push(['_link',this.href]); return false;
http://www.tourcms.com/support/setup/booking_engine/google_analytic...
However this seems to stop the "_blank" tag for the link working. I would like the booking process to open up a new window or tab, so it can just be closed at the end.
Any suggestions on why this is happening and how to fix it?
Thanks
Andrew
Tags:
Permalink Reply by Paul on April 21, 2011 at 8:30pm Hi Andrew,
Good question! I think the solution is to use _getLinkerUrl() however will need a little more time to test and write up an exact tutorial.
Paul
Permalink Reply by Andrew on April 21, 2011 at 9:54pm
Permalink Reply by Paul on April 27, 2011 at 8:22pm Hi Andrew,
A little JavaScript is required to do this, to make that simpler we have released a JavaScript file that you can download and include in your website. Full details on the Google Analytics tutorial page however once you have added the JavaScript file to your page you just need to add an onclick attribute to your links with the value return gaq_popup(this); e.g.:
<a href="https://live.tourcms.com/reserve/r1.php?t=7&a=828&w=486&ty=t&k=3c800be4e2a9&if=1&ifwidth=720" onclick="return gaq_popup(this);">Book online</a>
And you can control the size of the window by adding data-height and/or data-width attributes. For example the following will give an 800px wide 400px tall popup window:
<a href="https://live.tourcms.com/reserve/r1.php?t=7&a=828&w=486&ty=t&k=3c800be4e2a9&if=1&ifwidth=800" onclick="return gaq_popup(this);" data-width="800" data-height="400">Book online</a>
Please do ask if you get stuck, full details on the Google Analytics tutorial page in "Step 2".
Paul
© 2012 Created by TourCMS team.