• No results found

Embedding tracking code into IAS

N/A
N/A
Protected

Academic year: 2021

Share "Embedding tracking code into IAS"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

Table of Contents

1. Introduction ... 1

2. Pre-requisites ... 1

2.1. Sign up for a Google account and obtain the necessary code ... 1

2.2. Ensure you are using a custom MasterPage.master file ... 1

3. Including code in your MasterPage... 2

4. Including code in your MasterPageNoDecoration ... 3

(3)

Embedding tracking code in IAS Page 1

1.

Introduction

This short guide documents how tracking code can be embedded into the IAS solution in order to provide additional tools for reporting on IAS use. Google analytics is currently the most popular service used to capture usage information for your website, but other services are available such as Yahoo Web Analytics, Woopra, Statcounter etc. It can be used to capture a wide range of information on your site visitors including the incoming and outgoing links, the time they spend on the site, their geographic location etc.

These instructions can be modified to support any script that may be embedded into the IAS page, however it uses Google Analytics as an example. However each application may have its own set of instructions that will dictate how the code is embedded.

Google analytics, like many others, require the same code to be embedded on each page that needs to be tracked. Rather than edit each page however, InstantAtlas Server uses a template that it re-uses for each page. This template is called the MasterPage and is used for nearly all the IAS pages. By embedding the code in the MasterPage this will allow the IAS pages to be tracked.

2.

Pre-requisites

Prior to being able to embed the code into IAS you may need to follow some preliminary

instructions according to the instructions for the service you will be using. For our example using Google Analytics, you must first sign up for a Google analytics account. Once that is done we can then set up a custom MasterPage.master as explained below.

2.1.

Sign up for a Google account and obtain the necessary code

If you are using a tracking tool other than Google, you will need to follow those application specific instructions to obtain the code you need to embed.

If you are using Google Analytics, you will receive some code after signing up that looks like this: <script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script>

<script type="text/javascript"> try {

var pageTracker = _gat._getTracker("XX-12345678-1"); pageTracker._trackPageview();

} catch(err) {} </script>

Where XX-12345678-1 will be your unique code assigned to you via your Google account – it is called the Web Property ID or UA code.

Please note, there is an older snippet of code that uses an urchin.js file. We recommend that you upgrade and obtain the latest code from Google that utilises the ga.js file.

2.2.

Ensure you are using a custom MasterPage.master file

As we will be placing the code into the MasterPage.master file, this should be done on a version that is customisable. This can be done by following the standard customisation instructions (repeated below).

(4)

a) Are you using a custom master page already? If yes, go to step d) otherwise, proceed to b) You can check this in your admin site, by browsing to the settings page and looking at the key: Master Page URL. If this is pointing at something other than

~/App_Content/MasterPage.master then you are using a customised page. Typically this will be ~/Custom/MasterPage.master for most customised solutions.

b) If you are not using a custom MasterPage, change the current setting to point at ~/Custom/MasterPage.master (e.g. replace where it says App_Content with Custom) c) On the web server itself, ensure that this file exists by taking a copy of {Install

Location}/Webs/User/App_Content/MasterPage.master and copy it to {Install Location}/Webs/User/Custom

d) Edit the custom MasterPage.master file in a text editor using the instructions in section 3, below.

3.

Including code in your MasterPage

The code snippet now needs to be placed into an appropriate place in the MasterPage. This will require you to edit your custom MasterPage.master file in a text editor.

1) Locate the custom MasterPage.master file (see section 2.2) and edit it in a text editor

2) Browse to the appropriate place in the file to embed the code. Google recommends this is near the file header. As such, we recommend you find the closing body tag </body> and place the code just before this as per the screenshot below. Code for other solutions may vary.

(5)

Embedding tracking code in IAS Page 3

Note the 11 lines of code highlighted that have been inserted directly below the closing </asp:ContentPlaceHolder> tag and before the closing </body> tag. Line 1 and 11 of this snippet are additional HTML comments we have inserted – these are optional.

3) Save the file and test this has worked by checking the source of the page. It should now contain the code. If it does not, you may need to recycle the IIS application pool as the old file may be kept in memory. Alternatively you should check you are editing the correct

MasterPage.master file.

Data should now be getting sent to your tracking provider. For Google analytics data will become available over the next 48 hours in your Google account.

4.

Including code in your MasterPageNoDecoration

By adding the code to the MasterPage.master file you will be able to track and analyse the majority of pages in your IAS site. However there are a small number of pages that use the MasterPageNoDecoration.master template file instead such as the full screen dynamic report page.. To be able to track and analyse these pages you should edit the customisable version of this file in exactly the same way as is described above in sections 2.2 and 3.

Additionally if you have set up any stand-alone custom pages (under Customize > Pages in the admin console) that do not use the master page template you should add the code to these pages so that they are tracked and analysed in the same way as the other pages.

5.

Support

If after consulting the user documentation you require further support for IAS please contact the GeoWise User Support Team.

Email: support@geowise.co.uk

Telephone: United Kingdom: +44 131 624 8935

North America: 1-800-961-8948 (toll-free)

Hours: Monday-Friday

UK: 9:00am-5:00pm

References

Related documents

Our conceptualization of frame of reference may be used to interpret how the opportunity to engage in self-determined behaviors (in this study, individualized goal- setting)

Secondly, attachment mechanisms could be associated with a bias to stay with social partners which could be manifested as increased neural activity in septo-hypothalamic region

Keywords: Building envelope, buoyancy effect, natural ventilation, passive solar cooling, passive solar heating, solar air

The analyses reported here indicate substantial changes to soils sampled from across a climatic gradient through the sub- and maritime Antarctic, with those from Bird

This dissertation analyzes the motivations of governments, both foreign and domestic, in respond- ing to natural disasters. I address government responses to natural disasters in

In two additional 18 analyses reported here, we examined whether there was an effect of the direction of the vowel 19 change on subjects’ mean A-prime (A’) scores (Grier,

Compared to regular sparse grids, already our standard strategy for adaptive refinement significantly reduces the number of grid points which are required to obtain a certain

In that case the insurance carrier asserted the injured worker lacked standing to complain about the trial court's failure to submit any instruction on the sole