Type EN

Analytics Backup by QA
Preparation Guide
November 30, 2023
In this guide, we refer to "Analytics Backup by QA" as "GABQ" for short.
“WP" is an abbreviation for “WordPress.”
Google Universal Analytics may be abbreviated as 'UA'.

Step 1. Estimate Environment to Be Prepared
1. Server- What type of server should be prepared?
(1) Storage Capacity(2) PHP Memory Capacity
2. WordPress- How many WordPress are needed?
- How many servers do I need?
3. Analytics Backup by QA (GABQ)- License Key and License Content- Unit of Backed Up UA Data
4. Google Cloud Project (Regarding API Integration)- What does “API Integration” mean?
- How many Google Cloud projects should I create?
> When to create a project?
> Whose Google account will be used to create the project?
- Which Google account will be used to download data = API Integration?
Step 2. Setting Up the Environment
1. Prepare a Server for Backup (WordPress Server)- Backup Server Requirements
Server Specs
Requirements
2. Obtaining a Domain and Applying SSL
3. Install WordPress
4. Adjusting the Server Environment- Saving Error Logs
- Server's PHP Configuration
About “Backup Mode”
5. Checking Server Status After Backup Initiation
What Needed for Backup
Other Requirements

2
2
2
2
2
4
4
5
5
5
6
6
6
6
7
7
7
9
9
9
9
10
11
11
12
12
12
14
16
16
17

Step 1. Estimate Environment to Be Prepared
When it comes to taking backups, the primary requirements include the following four
elements:
1. Server
2. WordPress ← To be installed on the server
3. Analytics Backup by QA Plugin ← To be installed on WordPress
4. Google Cloud Project ← For API integration with Analytics Backup by QA
Especially, it's important to consider server specifications based on the backup data volume.
Here are some tips for evaluating the environment you need to prepare before implementing
GABQ.

1. Server- What type of server should be prepared?
It's necessary to have a server that can accommodate the volume of data you want to backup.
The main criteria for judgment are as follows:(1) A storage capacity sufficient to hold the data volume(2) Adequate PHP memory capacity to download and process data from Universal Analytics(UA)
Be sure to refer to Step 2 "Setting up the environment" for additional details regarding theserver and server settings.

(1) Storage Capacity
Because GABQ data is stored in files, a server with SSDs is strongly recommended.
When it comes to the size of your backup data files, we advise referring to the size
calculated using the "Data Backup Calculator" link provided below. (It's crucial that thestorage can accommodate the calculated number of files and data volume.) Generally, it's
advisable to have a storage capacity of 100MB or more.
▼ Data Backup Calculator (Analytics Backup by QA website)
https://ga-backup.com/en/#simulator(2) PHP Memory Capacity
GABQ sends requests to the Google API and takes backups in units of "URLs retrieved perday." During this process, the server's PHP memory is utilized.

Table A below shows the estimates of the number of "URLs retrieved per day" that GABQ
can back up based on the PHP "memory_limit".
(Table A)
memory_limit

Approx. Number of URLs Retrieved Per Day (*)

256M or more

1000-3000

512M or more

2000-5000

1000M or more

3200-8000

2000M or more

4000-10000

3500M or more

10000-30000■ This is an estimate when a server is used exclusively for GABQ.
■ The values presented in the table are intended as approximations
and should not be considered as absolute guarantees.

(a) Determine the "Number of URLs retrieved per day" in Universal Analytics (UA).
i)
ii)
iii)
iv)

v)

Log in to Google Analytics.
Select and display your backup target view.
(If you plan to back up many views, check the one with the highest traffic.)(Left menu) Behavior > Site Content > Display "All Pages."
Select a single date with a highest traffic for the date range.
(If unsure, you may want to display 1 to several months' data, and use graphs asreference to find a high-traffic day.)
The number of total rows, displayed in the lower-right corner, represents the“number of URLs retrieved per day".

(b) Within Table A, find the "memory_limit" value that meets the number of URL determinedin (a).
The "memory_limit" value that fulfills the URL count determined in (a) will become thenecessary server memory capacity for taking backups without reducing data.**See Step 2-4: Adjusting Server Environment > About “Backup Mode”

PHP Memory is used not only for backup processes but also when viewing lists anddisplaying data. Please ensure that you have a server with ample resources.

2. WordPress- How many WordPress are needed?
You need one WordPress for one license key.
【Example 1】
If you've purchased licenses for different backup periods (Three-Year and Whole-Period):
Each backup period's license comes with a distinct license key. If you have two license keys,
for example, you'll need two WordPress.
【Example 2】
If you're planning to set up several WordPress tailored to your backup data needs:
You'll need a separate license key for each WordPress.
(Using one license key for several WP isn't possible.)⁕ Have many licenses?
If you purchase more than one license, they will be like, for example:------------------------3 views x Three-Year
License key
Email address------------------------------------------------10 views x Whole-Period
License Key
Email address-------------------------

Each license key and license content are tied together.
When activating a license, make sure which license key you want to apply to which WordPress.
It will be less confusing and easier to manage if you have organized the data to be downloaded,
WordPress, license contents, and license key in advance.
(Example)

Data to be downloaded

WordPress

License contents

License key
Email address

Account "AAA" data
Account "aaa" data

WordPress A

3 views * Three-Year

License key A
Email address xxx

Views 1-3 in account"BBB"

WordPress B

10 views * Whole-Period License Key B
Email address xxx- How many servers do I need?
One server for one WordPress is recommended.
GABQ connects with Google API to download data from UA.
The Google Analytics Reporting API we use has IP address restrictions (for communication).
▼Google Analytics ”Limits and Quotas on API Requests”
https://developers.google.com/analytics/devguides/reporting/core/v4/limits-quotas?hl=en
For maximum performance, it is recommended to use one WordPress and one server per
license key.

You can install more than one WordPress by setting up several domains on one server, or byusing subdomains or subdirectories, but if you install many WordPress and run GABQ, they
will communicate with the API in parallel on one server. This will have a significant impact on
performance, so we do not recommend it. Also, do not use a WordPress multi-site
configuration.

3. Analytics Backup by QA (GABQ)- License Key and License Content
To turn on the GABQ functionality, you will need a license.
A license consists of the following three components:------------------------License content
License key
Email address

------------------------These three components are tied together.
A combination of a license key and an email address is used for GABQ licenseauthentication.
Once the license is activated, you will be able to back up data for the licensed amount (e.g.,"10 views x 2 years").

- Unit of Backed Up UA Data
The data to be backed up will be in units of "view" of Google Analytics. (Refer to the Setup
Guide for backup instructions.)▼Google Analytics Help Center “Hierarchy of organizations, accounts, users, properties, andviews“https://support.google.com/analytics/answer/1009618?hl=en

4. Google Cloud Project (Regarding API Integration)- What does “API Integration” mean?
GABQ communicates with Google API to download data from Google Analytics (Universal
Analytics).
To use Google API, an app needs to be created at Google Cloud.
The app has a “client ID” and a “client secret” which will be the key.
GABQ uses the key to access the app, and the app allows GABQ to use Google API and to
download data from Google Analytics (Universal Analytics).

- How many Google Cloud projects should I create?
To use API integration, you need to prepare (create and register) a project (app) on Google
Cloud Platform.
There is "one redirect URI" for one WordPress (GABQ).
Create a project for each WordPress (GABQ).
Although you can give multiple OAuth client IDs (redirector) to one project,
we recommend you to use one project per WordPress to avoid limitation of Google API
communication.
▼Google Analytics Guides ”Limits and Quotas on API Requests”
https://developers.google.com/analytics/devguides/reporting/mcf/v3/limits-quotas⁕ Have many licenses?
Projects can be named.
You may want to distinguish it with an easy-to-understand name. For example, theproject name is WP-GABQ-A because it connects to WordPress-A (GABQ).

> When to create a project?
To prepare a project (app), you need a "redirect URI" in GABQ. The redirect URI will be
displayed on the backup settings screen after license authentication.
It is well in time to create a project when you do the API authentication in GABQ.

> Whose Google account will be used to create the project?
A person who has permission to access the Universal Analytics “views” is recommended tocreate a project.
⁕ Have many licenses?
You can create many projects with one Google account.
Prepare projects as many as the number of WordPress (GABQ) you need.

About the maximum number of Google Cloud Platform projects
Note that there is an allotted number of projects (maximum number of projects you cancreate). (That number may vary depending on your Google account.)▼Google Cloud “Quotas and usage limits”
https://cloud.google.com/resource-manager/docs/limits?hl=en- Which Google account will be used to download data = API
Integration?
When you authenticate Google API integration on GABQ, you will be asked for the Google
account you want to integrate with.
The Google account must have permissions to access the “views” of Universal Analytics
which you want to back up. The permission should be "viewer" or higher.
Only the account of the user who has Chrome open (logged into Chrome) will be thedestination of choice.

So when you are at the step of Google API integration:● The person with Google Analytics user permissions for the data to be downloaded,● Using Chrome browser,● Do: WordPress Login > GABQ > Backup Settings > API Integration.

▼Google Analytics Help Center “Hierarchy of organizations, accounts, users, properties, andviews“https://support.google.com/analytics/answer/1009618?hl=en▼Google Analytics Help Center ”Access and data-restriction management” (See a term of“Universal Analytics”)
https://support.google.com/analytics/answer/9305587?hl=enStep 2. Setting Up the Environment
1. Prepare a Server for Backup (WordPress Server)
The server where WordPress (GABQ) is installed is responsible for data downloading(communication), data processing (aggregation, molding, and display), and data storage.
Ensure that you have a suitable environment.

- Backup Server Requirements
Please set up a separate server from a published website server.
To avoid problems caused by server overload during data acquisition and aggregation, we
strongly recommend that you use a separate server. (*)

Server Specs●●●

1 CPU or more (recommended)
Memory size: 4GB or more (recommended)
PHP version: 7.4 or higher (required)●

Recommended requirements for general rental servers
○

○
○
○
○

Should meet the above "server specs".
For memory size estimation, also see the "memory_limit value/number of
URLs retrieved per day" table in the term of “adjusting the server
environment” as a reference.
Easy to install WordPress.
Has storage space which is more than 100GB.
Able to change php.ini file settings (Required ...See Adjustment of server
environment for details).
Easy to apply SSL (Let's Encrypt, etc. should be available).

Requirements●

PHP version 7.4 or higher●

SSD (Solid-State Drive)
It must be able to store the number of files and amount of data required.
▼Use the "Data Migration Simulator" as a reference for size estimation.
https://ga-backup.com/en/#simulator
Since backup data will be stored as files, SSD is strongly recommended.

●

Domain (Subdomain is acceptable)
You need a domain (or subdomain) of the server where you want to install
WordPress.

●

SSL must be applied to the domain (or subdomain).
To use Google API, SSL is required.

●

WordPress installed
WordPress version: 5.9 or higher (supported: 5.9-6.2)(Refer to the "WordPress Installation" section below for details.)●

Permission for intercommunication with Google API servers
Communication must be possible between "the server where WP (GABQ) is installed⇔ Google API server" using a domain name (or subdomain name). (Communicationin both directions is required.)▼Specific Purpose● UA data request/download●

Permission for mutual communication with our license server
Communication must be possible between “the server where WP (GABQ) is installed⇔ our license server (mem.quarka.org)” using a domain name (or subdomainname). (Communication in both directions is required.)▼Specific Purpose● Operation of cron
*Permission to access ‘wp-cron.php’ in particular is required.
● License authentication, distribution of GABQ update files▼Note
If you apply basic authentication to a WordPress site with GABQ installed,communication will not be possible. Do not apply basic authentication.

●

The settings described in the "Adjusting the server environment" section below must
be configured.

If you are using a dedicated hosting service with security and need the IP address of ourlicense server to restrict access by a firewall, please contact support.

2. Obtaining a Domain and Applying SSL(1) Get a domain where you want to install WordPress.
➢ A domain is necessary for communication with Google API.
➢ Subdomain or subdirectory is acceptable.
(2) Apply SSL to the domain you have acquired (subdomain acceptable).
➢ SSL is required for Google API communication.
➢ Complete SSL application before GABQ license activation.
(If you change to an SSL-applied domain in the middle after starting to use GABQ, anerror may occur in the license authentication and Google API integration.)

3. Install WordPress●

It is strongly recommended to use WordPress only for GABQ.
We DO NOT recommend using GABQ on WordPress used for a published website.
(It may increase the server load and cause problems.*)●

One WordPress is required for one license key.

●●

Required WordPress version: 5.9 or higher (Supported 5.9-6.2)
Please avoid automatic updates for “major updates” of WordPress to prevent
unexpected errors.
▼WordPress Documentation / Configuring Automatic Background Updates
https://wordpress.org/documentation/article/configuring-automatic-background-updates/●

If you use WordPress exclusively for GABQ, you are encouraged not to publish yoursite externally.
You may want to go to WP Admin > Settings > Reading Settings and check the"Discourage search engines from indexing this site"; and to remove posts and pages
that are published by default.
▼WordPress Documentation / Settings Reading Screen
https://wordpress.org/support/article/settings-reading-screen/●

GABQ is a plugin, so it uses the WP admin screen. You do not need to prepare posts
or pages.

●

If you apply Basic Authentication to a WordPress site with GABQ installed, GABQ will
not work because it cannot communicate with our license server. Do not apply BasicAuthentication.

4. Adjusting the Server Environment- Saving Error Logs
Especially during the download of backed-up data, it's crucial to monitor the server status. To
ensure that no errors are occurring on the server and to have a trace in case any errors do
occur, it's recommended to configure the server to save error logs.
※ Please note that GABQ plugin cannot monitor the server status.
⇒ Related: 5. Checking Server Status After Backup Initiation- Server's PHP Configuration
The server environment should be adjusted according to the amount of data to bebacked up.
The setting values below are estimates. Adjust them according to your situation.
Configure the php.ini settings for the backup server. Review and adjust the settings forthe following four parameters:●●●●

upload_max_filesize
post_max_size
max_execution_time
memory_limit

1) Check the Default Settings
In the WordPress admin interface, there is a page to check the server's PHP configuration
values.
Navigate to WordPress Dashboard > Tools > Site Health > [Info] tab > [Server]. Pleasecheck the following:●●

Is the Upload max filesize (upload_max_filesize) set to 12M or more?
Is the PHP post max size (post_max_size) set to 12M or more?

●●Is the PHP time limit (max_execution_time) set to 240 or more?
What is the PHP memory limit (memory_limit) currently set to?

2) Configuration in php.ini
For any values identified as insufficient in step (1), configuration adjustments arenecessary. Particularly, the memory_limit setting significantly impacts operations such as
backup acquisition. Please ensure the following points are reviewed and configured:※ For instructions on configuring php.ini, refer to the manual or documentation of yourserver.
●Set ‘upload_max_filesize’ to 12M or more
Especially if you are using servers like AWS, the default value might be relatively low.
Adjust the ‘upload_max_filesize’ to 12M or more in the php.ini settings.
(12M is a minimum guideline; no change is necessary if it's already larger.)●Set ‘post_max_size’ to 12M or more
Similar to ‘upload_max_filesize,’ for servers like AWS, adjust the ‘post_max_size’ to
12M or more in the php.ini settings.
(12M is a minimum guideline; no change is necessary if it's already larger.)●Set ‘max_execution_time’ to 240 seconds or more
Increase the ‘max_execution_time’ to 240 seconds or more in the php.ini settings.
(240 seconds is a rough guide. Adjust according to your situation.)●Set ‘memory_limit’ to "a stable and maximum value possible"
In the php.ini settings, set ‘memory_limit’ to "a stable and maximum value possible".
*1,2,3
Memory is crucial not only for backup processes but also when viewing lists anddisplaying data. Memory allocation is highly important for using GABQ.
Please check the maximum value you can configure on your server. Set it to "a stable
and maximum value possible" on your server.
If you are using a server with recommended memory (4GB or more), use the TableAin the section titled “About Backup Mode” as a reference and set it with some margin.

Important:Memory significantly affects the amount of backup that can be acquired. Insufficient
memory may prevent obtaining the intended amount of backup. Always refer to the
documentation regarding "Backup Mode."

Considerations for 'memory_limit' Configuration
Generally, servers have predefined limits.
If you're unsure about the appropriate configuration value, be sure to confirm withyour server provider.
*1 Available Notations and Configuration Values● Whether abbreviated byte notations (G / M, etc.) are applicable● Treatment of "-1" ... While php.ini settings consider it as the maximum
value, its actual configurability depends on the server. (⇒*3 GABQ doesn't
support this)● Maximum Configuration Value*2 Actual Available PHP Memory Limit● Even though you have configured the memory limit in php.ini, the actual
memory limit that the server can provide may not meet the set value.
● If the actual available PHP memory is smaller than the configured value in
php.ini, there is a higher likelihood of encountering memory errors, as thiscan prevent accurate determination of the correct backup mode.
*3 GABQ does NOT support "memory_limit=-1"● If you set "memory_limit" to "-1", GABQ will use the lowest backup mode,
which corresponds to [ memory_limit value: less than 256M / Number of
URLs acquired per day: 0-1000 ].

About “Backup Mode”
If your server has less than 4GB of memory, which is a recommended specification, GABQ
will automatically operate in a “stable mode” that is designed to conserve server memory.
This is because on servers with less memory, attempting to retrieve up to 30,000 URLs perday, as allowed by the Google API specifications, could result in memory errors.
The number of URLs retrieved in relation to PHP's memory_limit value is outlined in Table A
below.

(Table A)
memory_limit
Less than 256M

Approximate number of URLs retrieved per day (*)
0-1000256M or more

1000-3000

512M or more

2000-5000

1000M or more

3200-8000

2000M or more

4000-10000

3500M or more

10000-30000■ This is an estimate when a server is used exclusively for GABQ.
■ The values presented in the table are intended as approximations andshould not be considered as absolute guarantees.

*The "number of URLs retrieved per day" can be checked by looking at the number of
URLs displayed in the "All Pages" report of Universal Analytics.
⇒See Step 1-1-(2) PHP Memory Capacity.

GABQ initiates backups by downloading data from pages with higher traffic. If the number of
URLs retrieved by GABQ, based on PHP's memory_limit value , is lower than the count of
URLs reported in UA's 'All Pages' report, there might be pages with lower traffic that won't beincluded in the backup process. As a result, the overall number of backed-up pages could be
reduced.

Notes Regarding Table A:
There is a range in the "Approximate number of URLs retrieved per day" due to variations
in data size for individual URLs depending on the site (UA view). If you prioritize thecertainty of backup acquisition, use the 'minimum value' in the "Approximate number of
URLs retrieved per day" of the table as a reference and adjust the memory_limit value
accordingly.

Memory is used not only for backup processes but also when viewing lists and displaying
data. Especially if you are using a typical shared hosting server, we strongly recommend
setting the ‘memory_limit’ value to the maximum value your server can handle (and remain
stable) rather than just meeting the minimum line for the daily URL acquisition count.*1,2,3

5. Checking Server Status After Backup Initiation
After starting the backup process for the target data, closely monitor the server for issues
like timeouts or memory errors*4. Keep an eye on the server's error logs and other relevant
information.
⇒ If server errors occur, there is a possibility that the backup data might be incomplete. In
such cases, we recommend redoing the backup process.
To prevent these errors, be sure to adjust your server environment before initiating the
backup process.
*4 Typically, errors are recorded in the following format (numeric values may varydepending on the situation):●

Timeout Error:
Fatal error: Maximum execution time of {60} seconds exceeded●

Memory Error:
Fatal error: Allowed memory size of {134217728} bytes exhausted (tried to allocate{20480} bytes) in ... on line {1078}

What Needed for Backup●

Google Analytics "Viewer" or higher permissions for the views to be downloaded fromGA.

●

“Analytics Backup by QA” zip file
○ Download the zip file "gabq.zip" from the GABQ site’s download page*.
*▼Software Download Page
https://ga-backup.com/en/gabqdownload/
The password for the page can be found in the email sent to you under the
subject "[Analytics Backup by QA] Your License and Download Information."●

Security plugin (recommended)○ Although not required for backup, installing a security plugin (such as
SiteGuard or Wordfence) is recommended for security reasons, as this is a
WordPress server.

Other Requirements●

Supported Browsers○ Google Chrome(*) Analytics Backup by QA is not responsible for any problems (including problems that affected the website
environment) caused by installing the software on the website server due to server load, etc.