Google Analytics

Google Analytics Overview

Google Analytics allows you to track your visitors counts, time on site and pages viewed along with a wide range of other traffic statistics. WebEd fully supports Google Analytics and provides easy-to-use tools for integrating Google Analytics

Adding Analytics to your Site Dashboard

Requirement: You will need a Google Account that owns the property (the website)

Full details are below, but this step-by-step guide will outline the process. This is an optional step if only the client requests to display the Google Analytics overview on the Dashboard.

Register for the Google OAuth Client

STEP-BY-STEP
  • 1
  • 2
    Sign in with your Google account
  • 3
    Click on the Create Project button to create a new project
  • 4
    In the pop-up window which appears, enter your project name as desired and click on Create button. Let this process run, it may take a few seconds
  • 5
    After the project is created successfully, the page reloads with some options on the left menu: Home, Marketplace, Billing, APIs & Services, Support, etc.
  • 6
    Click on the APIs & Services
    Google Analytics
  • 7
    Choose the Library tab.
    Google Analytics
  • 8
    In the search box on the top search "Analytics API", then click on "Google Analytics API".
    Google Analytics
  • 9
    Once you're on the Google Analytics API, click the "Enable" button
    Google Analytics
  • 10
    Now on the left menu, click the Credentials tab, then click Create Credentials on top, and choose OAuth Client ID.
    Creating Credentials
  • 11
    Follow the details for the Credential Type form
    Credential Type form
  • 12
    OAuth Screen form details:
    OAuth Screen form details
  • 13
    Update selected Scopes, search for the "Google Analytics API" on the filter section and select all the scopes from the results
    Update selected Scopes
  • 14
    If you are not on the Google Analytics API screen anymore, on the left menu, click the Credentials tab, then click Create Credentials on top, and choose OAuth Client ID.
    Google Analytics
  • 15
    Once you're on the "Create OAuth client ID" page, click the Configure Consent Screen button
    Google Analytics
  • 16
    On the OAuth Consent Screen, choose "External", then click the Create button
    Google Analytics
  • 17
    You will now be taken to the Edit App Registration page > OAuth Consent Screen
  • 18
    For the App Information, enter the following:
    • App Name - enter a name, which can be company name + "WebEd"
    • User Support Email - use the email address you created for the API (Gmail)
    Google Analytics
  • 19
    Under App Domain, enter the following:
    • Application home page
    • Application Privacy Policy link
    • Application Terms of Service link
    Google Analytics
  • 20
    Under Authorized Domains, enter the following:
    • Domain - add the domain of your site
    • Developer Contact Information - enter and add [email protected]
    • Then click the Save and Continue button
    Google Analytics
  • 21
    You will now be taken to the Edit App Registration page > Scopes
    • Click the Add or Remove Scopes button
    Google Analytics
  • 22
    A window "Update Selected Scopes" will pop up on the right
  • 23
    Click through the table rows and look for "Google Analytics API" without a lock icon
  • 24
    Once you find it, tick the box beside it, then click the Update button at the bottom of the window
    Google Analytics
  • 25
    Upon doing this, the window should close, and the Google Analytics API should now be added under "Your non-sensitive scopes"
    Google Analytics
  • 26
    Ignore "Your sensitive scopes" and " Your restricted scopes", and scroll to the bottom, click the Save and Continue button
  • 27
    You will now be taken to the Edit App Registration page > Optional Info
  • 28
    Ignore all fields here. Scroll to the bottom and click the Save and Continue button
    Google Analytics
  • 29
    You will now be taken to the Edit App Registration page > Summary screen
  • 30
    Check everything, then click the button "Back to Dashboard" at the bottom
    Google Analytics
  • 31
    Now, go back to the Credentials page, click Create Credentials, choose OAuth Client ID
  • 32
    You will now be taken to the Create OAuth client ID page
  • 33
    Enter the following information:
    • Application type - select Web application
    • Name - enter the name of the site or any preferred
    Google Analytics
  • 34
    Under Authorized JavaScript origins, add your website URL in the URIs field
  • 35
    Under Authorized redirect URIs, enter "https://developers.google.com/oauthplayground"
    Google Analytics
  • 36
    Click on the Create button. This will generate your Client ID and Client Secret
  • 37
    Once you click the Create button, the page reloads and a window with your Client ID and Client Secret information appears
    Google Analytics
  • 38
    Copy both Client ID and Client Secret and paste them into Notepad, you will need it in a minute

Add to the Google Analytics Site Setting to your Website Admin Dashboard

STEP-BY-STEP
  • 1
    Enter the Client ID, Client Secret and Refresh Token in the Settings
  • 2
    Click Save Settings.
  • 3
    Your dashboard will load.

Add the OAuth details to your website

STEP-BY-STEP
  • 1
  • 2
    On the right side of the window, click the Settings icon
  • 3
    Tick the box for Use your own OAuth credentials
  • 4
    In the pop-up window which appears, enter your project name as desired and click on Create button. Let this process run, it may take a few seconds
  • 5
    Enter the copied Client ID and Client Secret in the corresponding fields, then click Close at the bottom
    Google Analytics

Step 1: Select and Authorize APIs

STEP-BY-STEP
  • 1
    Search for "Google Analytics API v3" using the scroll. Click all the options under it, then click on the Authorize APIs button after the selection
    Google Analytics
  • 2
    Accept all the permissions asked by Google
  • 3
    If you get any Authorisation Errors, please make sure your Gmail account has been added to Test users
    Google Analytics

Step 2: Exchange Authorization code for tokens

STEP-BY-STEP
  • 1
    Now in Step 2 on the left side panel. Click "Exchange Authorization code for tokens"
    Google Analytics
  • 2
    Click on Auto-refresh the token before it expires.
  • 3
    Copy the Refresh token generated
    Google Analytics

Adding Analytics Tracking to your site

Get Your Analytics Code from Google

The first step is to get the tracking code for your site. You get this from your analytics account.

If you don't have an analytics account you can create one here - https://www.google.com/analytics.

STEP-BY-STEP
  • 1
  • 2
    Go to the admin panel
    Google Analytics
  • 3
    Go to the tracking code window
    Google Analytics
  • 4
    Copy the tracking code
    Google Analytics
  • 5
    Go to the website and access admin management, in the left menu select Settings > Site Settings then search Google Analytic Configuration key
    Google Analytics
  • 6
    Click on the Edit icon then in the edit site settings page, paste the Google Analytics tracking code to the Tracking Script field.
    Google Analytics

Editing the Analytics code on your site

Get Your Analytics Code from Google

The first step is to get the tracking code for your site. You get this from your analytics account.

If you don't have an analytics account you can create one here - https://www.google.com/analytics.

STEP-BY-STEP
  • 1
    Go to the website and access admin management, in the left menu select Settings > Site Settings then search Google Analytic Configuration key
    Google Analytics
  • 2
    Click on the Edit icon then in the edit site settings page, paste the Google Analytics tracking code to the Tracking Script field
    Google Analytics
  • 3
    Click Save to apply changes

Adding Google Analytics Tracking Code into your Master Template

This step will already have been done for you by the WebEd team. It is added here for reference only and should not generally be required.

STEP-BY-STEP
  • 1
    In the left menu, select Page Content > Look And Feel > Page Templates
    Google Analytics
  • 2
    Edit the default template, add Google Analytics curly bracket by clicking on Add curly bracket button then search Google Tracking Code
    Google Analytics
  • 3
    The curly bracket code will be added as shown below:
    Google Analytics

Managing your Analytics Account

How to Set Up Set User Permission on Google Analytics

STEP-BY-STEP
  • 1
    Go to Analytics Account if you want to add permissions
  • 2
    On the left- side menu, click Admin
    Managing Analytics Account
  • 3
    Under Admin Section, select Account User Management
    Managing Analytics Account
  • 4
    The account permissions window will appear. Click the Add (blue plus button) on the upper right corner of the page.
    Managing Analytics Account
  • 5
    A tiny pop-up will appear. Choose Add Users
  • 6
    The Add Permissions Window will appear. Add the email of the account you want to add and the necessary permissions
    Managing Analytics Account

Note on Adding Permissions

Be careful adding Edit permissions to anyone since they may mess up some reporting.

How to Get Tracking ID and Tracking Code from Google Analytics

STEP-BY-STEP
  • 1
    Go to Admin
    Managing Analytics Account
  • 2
    Under Property Column, Click on Tracking Info
    Managing Analytics Account
  • 3
    A dropdown menu will appear, choose Tracking Code
    Managing Analytics Account
  • 4
    A Section will appear and show the Tracking Info and Tracking Code
    Managing Analytics Account

Test Events via Data Layer Push

Be careful adding Edit permissions to anyone since they may mess up some reporting.

How to Get Tracking ID and Tracking Code from Google Analytics

STEP-BY-STEP
  • 1
    Install Simple Data Layer Push on Chrome Store
    Managing Analytics Account
  • 2
    Pin the extension to the taskbar
  • 3
    Go to the webpage where the event should be tracked
  • 4
    Perform the action for the event based on the request
  • 5
    Click on the extension
  • 6
    A pop-up will appear and show you the list of events on the page
    Managing Analytics Account
  • 7
    Search for the event to see if it is working. If it's there, then it means the event is successfully added.

Adding Goals Directly on Google Analytics for Page View/ Thank You Page

STEP-BY-STEP
  • 1
    Go to Admin
    Managing Analytics Account
  • 2
    Go to View tab and click on Goals.
    Managing Analytics Account
  • 3
    Click Create Goal
    Managing Analytics Account
  • 4
    Fill out the name of the goal and click the Destination radio button
    Managing Analytics Account
  • 5
    Click Continue
  • 6
    Add the URL of the Page to track
    Managing Analytics Account
  • 7
    Click Save

How to Set Up to Capture 100% Visitor tracking for Page Speed Rate

STEP-BY-STEP
  • 1
    Log in to Admin Module
  • 2
    Go to Site Settings
  • 3
    Search Google Analytic API
  • 4
    Insert this code: {'site_speed_sample_rate': 100}); within the Google Analytics tracking code beside the tracking numb
    Managing Analytics Account
  • 5
    Click Save

Exporting Google Analytics Data to Google Sheets

STEP-BY-STEP
  • 1
    Access the Google Analytics Accounts
  • 2
    Add Google Analytics Ad on Google Sheet
  • 3
    Go to the folder under shared folders where the sheet will be saved
  • 4
    Click the New button
  • 5
    Click Google Sheets and choose Spreadsheet
  • 6
    Create the title of the report
    Managing Analytics Account
  • 7
    Click Add-ons from the Menu. A dropdown will appear and click on Google Analytics
    Managing Analytics Account
  • 8
    Another dropdown menu will appear. Click on Create New Report.
    Managing Analytics Account
  • 9
    A small window will appear on the left of the screen. Input the data needed which includes the Name of the Report, select a View which requires the Google Analytics Account and its View settings.
    Managing Analytics Account
  • 10
    Under the third columns, choose the necessary metrics, dimensions and segments needed. Click Create Report when done.
    Managing Analytics Account
  • 11
    Name Report Configuration. Add the necessary data needed
    Managing Analytics Account
  • 12
    Go back to the Google Analytics add on and Click Run Report from the dropdown menu to generate report.
    Managing Analytics Account

Setup Automated Google Analytics Reports

Outlines how to manage scheduled Google Analytics email reporting

What is a Google Analytics Reports

Provides a snapshot of your google analytics emailed to you as required.

How to set up scheduled emails

STEP-BY-STEP
  • 1
    Go to https://www.google.com/analytics/ and log in to google analytics
  • 2
    Choose "Audience" >> Click "Overview"
    Google Analytics
  • 3
    On Audience Overview, click the "Share" button
  • 4
    A popup setup scheduled email will be shown
    Google Analytics
  • 5
    Add emails that will be received, choose Frequency, add content for email
  • 6
    Click "Send" to save
  • 7
    Go to Scheduled emails to check that exits
    Google Analytics

How to extend the time of scheduled emails

Email reports are configured for some time. This may need to be extended as time progresses.

STEP-BY-STEP
  • 1
    Go to https://www.google.com/analytics/ and log in to google analytics
  • 2
    Click "Admin"
    Google Analytics
  • 3
    On admin page, Select "Scheduled emails"
    Google Analytics
  • 4
    Select the email that you want to extend the time
    Google Analytics
  • 5
    Click "Extend"
    Google Analytics
  • 6
    The expiration date will be changed. Click "Save"
    Google Analytics
  • 7
    The scheduled email will be updated.
    Google Analytics