Leon Atherton Leon is a developer at IDRsolutions and product manager for BuildVu. He oversees the BuildVu product strategy and roadmap in addition to spending lots of time writing code.

Adding Google Analytics to Web Content

2 min read

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:


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.

Can we help you to solve any of these problems?

IDRsolutions has been helping companies to solve these problems since 1999.

Convert PDF to HTML5 or SVG with BuildVuConvert PDF to HTML5 or SVGConvert AcroForms and XFA to HTML5 with FormVuConvert PDF forms to HTML5
Java Image SDK for working with Image files with JDeliJava SDK for Image files JPedal Java PDF SDK for working with PDF filesJava SDK for PDF files
Leon Atherton Leon is a developer at IDRsolutions and product manager for BuildVu. He oversees the BuildVu product strategy and roadmap in addition to spending lots of time writing code.

Leave a Reply

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

IDRsolutions Ltd 2021. All rights reserved.