Google Maps integration

From ClickTale Wiki
Jump to: navigation, search
ClickTale Wiki
The instructions on this page are intended for self service and online accounts.
Enterprise customers should contact their account managers for integration support.

If you are using Google Maps on your website you might receive the following message when loading movies or reports for your site: "The Google Maps API key used on this website was registered for a different website." This is due to ClickTale caching your pages from your domain and then showing them from our own domain(cross-domain), the API security prevents the key being used in an unassigned domain. The solution is to disable activating Google Maps while your site pages are shown and analysed in your ClickTale Account whilst leaving the functionality on the site unchanged.

Instructions

Open the page where your Google Maps code is located. Find a line that says:

if (GBrowserIsCompatible())

and change it to:

function CTIsPlayback() {
   try { return parent && parent.WebPlayer; }
   catch(e) { return false; }
}
if (GBrowserIsCompatible() && !CTIsPlayback()  )

If Google Maps initialization happens after the ClickTale tracking code has been loaded you can also implement the change as:

if (GBrowserIsCompatible() && !(typeof ClickTaleIsPlayback=="function" && ClickTaleIsPlayback() )  )

Publish the modified file online. The change will not affect any existing recordings.

Alternative solution

In certain rare cases the above code may not work. If so, just use the ClickTaleExcludeBlock to ignore the Google Maps code by wrapping the script tag:

<script type="text/javascript" src="http://maps.google.com/maps?file=api... ></script>

like so:

<!-- ClickTaleExcludeBlock -->
<script type="text/javascript" src="http://maps.google.com/maps?file=api... ></script>
<!-- EndClickTaleExcludeBlock <script type="text/javascript"> </script> -->
Personal tools