Skip to main content

Google Analytics

Connect an existing Google Analytics 4 property

Open the admin interface of your Google Analytics account and select your Google Analytics 4 property

Step 1

Google Analytics

Step 2

Google Analytics

Step 3

Google Analytics

GA4 API secret

note

Setting the GA4 API secret will enable the measurement protocol for GA4.

info

While the purchase count and total amount are tracked much more accurately using the GA4 Measurement Protocol it still has a several shortcomings. At this point GA4 is not at par with the former Google Universal Analytics, especially when using the Measurement Protocol.

Enabling the GA4 Measurement Protocol is optional and it comes with tradeoffs. It will give you more accurate order purchase counts and total amounts. But on the other side, several other metrics and dimensions will be missing or inaccurate. Here are some of the tradeoffs:

  • The realtime order events will not be available.
  • Orders will only show up after 24 hours.
  • The geographic information on orders will be missing.

For a more complete list and more details about the tradeoffs read the GA4 Measurement Protocol shortcomings FAQ.

  1. Open the admin interface for the GA4 property

    GA4 settings data streams

  2. Open the website data stream

    GA4 settings open the data stream

  3. Open the API secret setup menu

    GA4 settings API secret menu

  4. Start creating a new API secret

    GA4 settings create API secret

  5. Give the new API secret a name. Use the plugin name. It will help you to associate which API key is being used by which app.

    GA4 settings give API secret name

  6. Copy the new API secret

    GA4 settings copy the API secret

  7. Paste the new API secret into the plugin and save it. You'll find the API secret setting under Advanced > Google in the plugin.

    GA4 paste the API secret into the Pixel Manager

GA4 Data API

info

Available from version 1.26.0

The Pixel Manager is able to connect to the GA4 Data API and retrieve reporting data through it.

The first report available is the order source attribution report. It shows the order source attribution using the connected GA4 accounts attribution method, which is data-driven by default.

info

GA4 can take up to 24 hours to process the attribution before it is available on a specific order.

Order window with GA4 order attribution enabled

GA4 order attribution detail window

GA4 Property ID

  1. Open the GA4 admin settings and then the property settings.

GA4 admin settings

  1. Copy the property ID from the top right.

GA4 admin copy the property settings

  1. In the Pixel Manager open > Advanced > Google and paste the property ID into the GA4 property ID field.

Paste the GA4 property into the Pixel Manager

GA4 Data API Credentials

Enabling access to the GA4 property from which you want to retrieve data is a two-part process.

In the first part, we need to create access credentials, download them to the computer and upload them into the Pixel Manager.

In the second part, we need to add the client_email from the access credentials to the GA4 property, which will authorize the retrieval of data from that GA4 property.

  1. Open the GA4 API Quickstart manual: API Quickstart

  2. Click the Enable the Google Analytics Data API v1 button.

Click the 'Enable the Google Analytics Data API v1' button

  1. You will be prompted to enter a name for the project. Give it a name that contains the name of the website, like "GA4 example-com" (dots are not allowed, so we exchanged it with a dash). Then click NEXT.
info

Theoretically, you can use the same credentials for multiple websites. But, for long-term setup, we recommend creating separate credentials for each website. If you ever decide in the future to delete one of the credentials, because of a change of ownership or any other reason, only that particular website credentials will have to be recreated.

info

When creating the access credentials, they will be enabled on your personal Google account. That's why it is recommended that the credentials are created by the owner of the website. If you are working for an agency or if you are a freelancer, ask the owner of the website to create the credentials and upload them into the Pixel Manager.

GA4 Data API credentials project prompt

  1. Download the credentials to your computer.

GA4 Data API credentials download window

  1. In the Pixel Manager go to > Advanced > Google and import the credentials.

Pixel Manager GA4 credentials import settings

  1. Copy the client_email from the credentials settings.

Pixel Manager GA4 credentials client email

  1. Go to your GA4 admin settings and open the Property Access Management.

GA4 admin settings property access management window

  1. Click the big plus sign to add a new user.

GA4 admin settings property access management add new user button

  1. Paste the client_email into the email addresses box. Make sure to only give it the Viewer role. And finally, click Add to add this new user to this GA4 property.

GA4 admin settings property access management add new user settings

Page Load Time Tracking

note

Available from version 1.30.6, only for users of the premium version

At the time of the release of this feature, GA4 still doesn't offer an integrated way to measure page speed load times like Google Analytics Universal does.

Therefore, we decided to add a basic page load time tracker for GA4.

We've made this feature an opt-in feature for now. We might change this in future and just enable it by default.

Here's how to set it up:

  1. Enable the GA4 Page Load Time Tracker in the Pixel Manager.

  2. Go to GA4 > Admin > Custom Definitions > Custom Metrics and click Create custom metrics.

GA4 page load time tracking creating the custom metric step 1

  1. Set the following fields:
  • Metric Name: Page Load Time

  • Event parameter: page_load_time_seconds

    (This will not be available in the drop down list. Simply write, or copy and paste it into the field.)

  • Unit of measurement: Seconds

GA4 page load time tracking creating the custom metric step 2

Make more money from your ads with high-precision tracking