Adding Google Analytics to Web Content

Google Analytics is a fantastic free service provided by Google, that allows you to see detailed information about who is viewing your content, how your content is being found, and how your content is being used.

The standard reports are split into 5 sections:

1. Real Time

This section shows you what it happening on your content right now. Data includes how many people are reading it, where they are from, where they came from, and what they are viewing.

2. Audience

This section tells you all about who is visiting your content. Data includes where visitors are from, how many visits there has been, how many pages have been viewed, how many pages are viewed per visit, how long visitors stay for, what web browser and operating system visitors use, and what percentage of visits are from new visitors.

3. Acquisition

This section is all about how your content was found. Data includes whether visits came from organic search, social, referrals or direct traffic, and also includes more detail about the visits such as the keywords they used and what page they landed on.

4. Behavior

This section is all about the content. Data includes how many views each page got, how long was spent on each page, how many people left on each page, how many people viewed just one page and then left, and how many people entered the website on a particular page.

5. Conversions

The last section is about how well you are achieving goals and converting visitors. It requires manual set up in order for it to track data.

Setting Up Google Analytics

To set up Google Analytics, you need to enable Analytics on your Google Account by going to the Google Analytics website, and clicking on ‘Access Analytics’ in the top right. You should then set up your account, and add a property/view for your website which will generate a tracking ID.

The tracking ID is in the format UA-XXXXXX-X, and you will be given a snippet of code that you should add to every page on your website which contains that ID. To learn more about using this snippet of code on your own website, you should click here: https://support.google.com/analytics/answer/1008080

Integrating Google Analytics with PDF to HTML5

If you want to integrate Google Analytics with our software, we provide an easy way to add the tracking code to all the pages that we generate.

If you are using our free online converter, there is an option to enter your Analytics Tracking ID in the Advanced Menu. Here is a screenshot showing that option:

AnalyticsID

If you are using our web services converter, you should add the flag org.jpedal.pdf2html.googleAnalyticsID to your conversion params, and set the value to your ID.

If you are using our jar file, you can set the value as a system property, add the value to the properties map, or set the value on the HTMLConversionOptions object. You can learn more about that by reading the example file.

If you want to learn more about our PDF to HTML5 Converter, please click here to find out more, and click here to use our free online converter.

This article is part of a series of articles with suggestions for enhancing your HTML5 content. You can also read about Adding Annotations with Annotator.js, Adding Fullscreen using the JavaScript FullScreen API, Optimising Images using PNGQuant, and Password Protecting content with Apache htaccess.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (TwitterFacebook and Google+) or the Blog RSS.

Related Posts:

The following two tabs change content below.
Leon is a developer at IDRsolutions and product manager for JPDF2HTML5. He is responsible for managing the JPDF2HTML5 product strategy and roadmap, and also spends a lot of his time writing code to build new features, improve functionality, fix bugs, and improve the testing for JPDF2HTML5.
Leon Atherton

About Leon Atherton

Leon is a developer at IDRsolutions and product manager for JPDF2HTML5. He is responsible for managing the JPDF2HTML5 product strategy and roadmap, and also spends a lot of his time writing code to build new features, improve functionality, fix bugs, and improve the testing for JPDF2HTML5.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>