Documentation / Importing Historical Data / Google Analytics 4

Import from Google Analytics 4

Export your GA4 pages report and upload it to GhostlyX to populate your historical pageview data.

Scale plan required

Historical data import is available on the Scale plan. You must be a site owner or admin to access the Import Data page.

1

Export your pages report from GA4

GhostlyX reads the Pages and screens standard report from GA4. Follow the steps below to export it as a CSV.

1

Open Google Analytics

Sign in to Google Analytics and select the GA4 property you want to export data from.

2

Go to Reports

In the left sidebar, click Reports.

3

Open the Pages report

Navigate to Engagement, then click Pages and screens.

4

Set your date range

Use the date picker in the top right to select the full historical range you want to import. Choose the earliest date your site was live through to today.

5

Set rows per page to the maximum

Scroll to the bottom of the report and change the rows-per-page selector to 250 (the maximum). If you have more than 250 pages, you will need to export multiple files and upload them one at a time.

6

Download as CSV

Click the download icon (top right of the report, looks like a downward arrow into a tray) and select Download CSV. This saves a file named something like Pages_and_screens_YYYYMMDD-YYYYMMDD.csv.

Expected CSV format

Your CSV should look like this. GhostlyX reads the Page path and screen class and Views columns.

# Google Analytics 4 export header rows (ignored)
Page path and screen class,Views,Users,New users,...
/,12450,8320,6100,...
/blog/,4200,3100,2800,...
/pricing/,1980,1540,1200,...
/about/,870,690,510,...
2

Upload to GhostlyX

1

Open your site dashboard

Go to your GhostlyX dashboard and open the site you want to import data into.

2

Click Import Data

In the site toolbar, click the Import Data button.

3

Select source

Choose Google Analytics 4 from the source dropdown.

4

Upload the CSV

Click Choose file and select the CSV you downloaded from GA4. Then click Start import.

5

Wait for processing

The import runs in the background. You can track progress on the Import Data page. Large files may take a few minutes.

Common issues

0 rows imported

Make sure you exported the Pages and screens report from Engagement, not a Channels or Traffic sources report. The importer looks for the Page path and screen class column. If that column is missing, no rows will be imported.

Only 250 rows imported but you have more pages

GA4 limits CSV exports to 250 rows. Export multiple date ranges or filter by page group, then upload each file separately.

GA4 added header rows to my CSV

GA4 exports include a few header/metadata rows above the actual column headers. GhostlyX automatically skips these rows.