Google Analytics Integration

The Google Analytics Integration allows displaying in [wpjb_employer_panel] and wp-admin panel a chart with page views and number of applications over a selected period of time.

The chart can look like in the image below:

Analytics chart in wp-admin panel.

More about this extension you can read in Google Analytics Integration description page. This add-on is available to all Business License owners with an active subscription. You can download it from client panel.

Configuring Analytics

Before you will be able to use the Analytics Integration you will first need to create a Google API Project, add the Analytics API and Service Email to it and assign allow the service email to access your Google Analytics account in read-only mode. That is quite a lot and might be complex so let us break it down into separate steps.

Creating Google API Project

Go to Google Developers Console, find “Create a Project” button it should be somewhere at the top, i cannot tell for sure as Google is changing this interface quite often. When i am writing this article, to create a project you would need to click drop-down next “Google APIs” at the top left and in new modal window click “+” button to create a project.

For more details refer to Google API Create a Project documentation.

Creating Service Account

Once you have a project you need to add service account to it. The service account will basically allow accessing the Analytics API.

To create an account, click on the key icon in the left sidebar, then click “Create Service Account” drop-down and select Service Account Key as on the image below

Once you do that you should see a create Service Account form. Without changing anything click “Create” button. This will download the service key to your computer (it will be saved in your downloads folder).

The last thing you will need to do is go back to the “Credentials” screen (the arrow #1 on the image above). On the right side, you should see “Manage service accounts” link, click it you will see a screen like the below one from which you can copy the “Service Account ID” which we will use later.


Enable Analytics API

In our Google Analytics Project, we will additionally need to enable Analytics API, in the left sidebar click the Libraries link (above arrow #1 in the second image).

You will go to the page where you can search for APIs. In the main search bar with “Search for APIs & Services” placeholder type “Analytics API“. It should find the “Analytics API“, click on it and then click “Enable” button.

Add Service Account to Google Analytics

With the email address, you copied earlier, go to your Google Analytics account, click Admin / User Management and add your service account email to the users list, now we are ready to configure the Google Analytics for WPJobBoard.

If you are having problems with adding the account, then please refer to the Google documentation.

Note, for security reasons it is best to add the user with “Read & Analyze” permissions only.

Configuring WPJobBoard

We are now ready to configure the Google Analytics Integration in WPJobBoard. Go to wp-admin / Settings / WPJobBoard – GA panel.

You should see there a configuration form like on the image below

Enter following information in the fields:

  • Application Name – you can enter any string here, for example, “WPJobBoard – Integration”.
  • Service Email – paste here the email address copied in step “Creating Service Account”.
  • Key – remember the file downloaded to your computer after creating a service account? Open it and copy WHOLE content from the file and paste it here.

Save the form, if everything will go properly you should see a screen like the one below

Now you just need to select your website in “Select Service” field and save the form again.

Using Google Analytics Integration

The properly configured integration will show in three places:

  • On Job Details pages it will show a “Page Views” row.
  • In the [wpjb_employer_panel] / Listings there will be an “Analytics” button which will show a chart with number of page views and applications in the last 30 days.
  • In wp-admin / Job Board panel when editing a job there will be an “Analytics” widget in the sidebar. It shows a basic information about a job and a button which allows showing a chart similar to the on in Employer Panel.

You can see how the Google Analytics integration looks like on the screenshots in the integration description.

NOTE the stats on Ad details pages are being cached once an hour to avoid going over the Google Analytics API limits (which is 5000 API calls per day for free accounts).

Leave a Reply

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