# Import your data

> Bring your history from Google Analytics, Plausible, Fathom, Umami or another Reveata website, so your charts start before you installed Reveata.

You can import the history of your website from another analytics tool, so your charts and reports start before the day you installed Reveata. Open **Settings → General → Import data** (website admins can import), pick where the data comes from and follow the steps shown there.

Reveata never counts a day twice. A day that already has Reveata data keeps Reveata's own numbers, and the imported numbers for that day are left out. If you import the same days again, or from a second tool, the newer import replaces the older one for those days.

## Two kinds of imports

- **Events** (Google Analytics 4 BigQuery export, Umami, Reveata exports): every page view and event is imported, with its visit and visitor. These visits work like the ones Reveata collects: every report, filter and visitor profile includes them.
- **Daily totals** (Google Analytics 4 through Google, Plausible, Fathom): these tools only export daily numbers per page, source, country and so on, not single visits. Reveata stores them as imported daily totals and adds them to your charts, overview and breakdowns for those days. They show for whole days, weeks and months, unfiltered or with one filter (for example one country). Hourly charts, visitor profiles, funnels and combined filters only use data Reveata collected. Unique visitors over several imported days are the sum of each day's visitors.

You can follow every import in the list under the form: how far it is, what was imported, and notes about rows that were skipped. A daily totals import can be removed again with **Remove data**.

Files can be up to 500 MB. Zip and gzip files are read as they are, no need to unpack them.

## Google Analytics 4

1. Choose **Google Analytics 4 (connect Google)** and click **Connect Google**. Sign in with a Google account that can see the property. Reveata asks for read-only access (`analytics.readonly`), so it can read your reports but not change anything.
2. Pick the property and how much history to import (one to five years).
3. Click **Start import**.

Reveata reads daily totals through the Google Analytics Data API, one month at a time, newest first: visitors, sessions, pageviews, bounces (sessions that were not engaged) and session duration, by day, source and medium (turned into Reveata channels), campaign, page, landing page, country, device, browser, operating system, and events (as goals). Page views, scrolls and clicks are not imported as goals.

Google limits how much each property can read per hour and per day. When the limit is close, the import pauses and continues on its own once Google allows it; the list shows when. Yesterday is the newest day imported; today is left to Reveata.

You can disconnect Google afterwards with **Disconnect Google**. The imported data stays.

## Google Analytics 4 BigQuery export

If your property is linked to BigQuery, you can import every single event instead of daily totals.

1. In Google Analytics, link the property to BigQuery (**Admin → Product links → BigQuery links**). Google only exports days after the link was made.
2. In BigQuery, export the `events_*` tables as newline-delimited JSON and download the files.
3. Choose **Google Analytics 4 BigQuery export** and upload one file at a time.

Page views become page views, `scroll` events scrolls, outbound clicks external links and other events goals with their parameters. Visits are built from `user_pseudo_id` and `ga_session_id`, the channel from the source and medium, and countries are turned into country codes. Days that already have other visits in Reveata are skipped. Revenue from Google Analytics is not imported: connect your payment provider instead.

## Plausible

1. In Plausible, open **Site settings → Imports & Exports** and click **Export data**. Plausible emails you a link to a zip file.
2. Choose **Plausible CSV export** and upload the zip as it is.

Reveata reads these files of the zip: `imported_visitors`, `imported_sources`, `imported_pages`, `imported_entry_pages`, `imported_exit_pages`, `imported_custom_events`, `imported_locations`, `imported_devices`, `imported_browsers` and `imported_operating_systems`. Custom properties are not imported, and neither are Plausible's own outbound link and file download events. Regions and cities are not imported (Plausible exports them as codes); countries are. You can also upload one of the CSV files on its own.

## Fathom

Fathom exports one CSV per breakdown.

1. In Fathom, click the download icon on the dashboard and choose **Custom export** (or go to **Settings → your site → Exports → New export**).
2. Pick **Pageviews**, the date range, grouping **Daily** and every metric (pageviews, visitors, visits, bounce rate, average time on site).
3. Export once with no dimension for the site totals, then once for each breakdown you want: Page, Referrer, Country, Device type, Browser, Operating system or UTM parameters (Fathom puts all five UTM columns in one file; that is fine). For goals, export **Events** with the event name and both completion counts.
4. Choose **Fathom CSV export** and upload each file, or one zip with all of them.

Each file adds its breakdown to the days it covers, so you can upload them in any order. Bounces and time on site are only imported when the file has a visits column.

## Umami

1. In Umami, open **Settings → Data** and click **Export**. Umami emails you a link to your data.
2. Choose **Umami data export** and upload the file as you received it (CSV, gzip or zip).

Page views and custom events are imported as events, with their visit (`visit_id`) and visitor (`session_id`), referrer, UTM tags, ad click ids, country, device, browser and operating system. The channel is decided by Reveata's own rules. Days that already have other visits in Reveata are skipped.

## Reveata exports

To move data between two Reveata websites, export the events of the first one (**Danger zone → Export all data**, or `POST /api/app/websites/:siteId/exports` with `format: json`) and import the file into the other with **Reveata events export**. Visits already on the website are skipped, so you can import the same file twice without counting anything twice. Payments come from your payment provider and are not imported from files.

## If an import stops

An import that stops halfway (for example while Reveata is updated) continues by itself where it stopped, without writing anything twice. If an import fails, the list shows why, and anything it wrote is removed: the days an earlier import covered keep that import's numbers. Fix the file and upload it again.
