Google Analytics 4

Google Analytics 4 is a new kind of Google Analytics, with different reports than what you're used to seeing in Universal Analytics properties.  One advantage of a Google Analytics 4 property is that you can use it for a website, an app, or both a website and an app together. Universal Analytics properties only support websites. You can read the announcement from Google to learn more.

Note: If you want to set up Universal Analytics alone, please click here


What's covered in this article:


Client Side Tracking vs. Server Side Tracking, Which does Xola use and why?

The difference between server-side tracking and client-side tracking has to do with where the tracking code is processed.

In client-side tracking, the tracking code is processed by the user's web browser. So, when someone visits a website, the tracking code runs on their browser and sends information about their activity back to Google. This means that the tracking is done on the user's end.

Server-side tracking processes the tracking code on the server-side or the website's backend. So when someone visits a website, the tracking code is processed by the website's server, and the resulting data is sent to the analytics tool. This means that the tracking is done on the server's end.

The main difference between the two is that client-side tracking can be affected by ad blockers and browser settings, while server-side tracking is not. Additionally, server-side tracking can offer greater control over data privacy and security since the data is not being sent to third-party services that could potentially mishandle it.

For these reasons, Xola will be using Server Side Tracking.

 

Setting up Google Analytics 4

If you already have an active GA account, skip to Migrating from UA to GA4

New Google Analytics Account

  1. Sign up for a Google Analytics account 

Create a new Property

  1. In Admin, look at the Account column to ensure you've selected the right account.
  2. Then, in the Property column, click Create Property.
  3. Enter a name for the property and select the reporting time zone and currency.
    • If a visitor comes to your website on a Tuesday in their time zone, but it's Monday in your time zone, the visit is recorded as having occurred on Monday.
    • If you choose a time zone that honors Daylight Savings Time, Analytics automatically adjusts for time changes. Use Greenwich Mean Time if you don't want to adjust for Daylight Savings Time.
  4. Click Next. Select your industry category and business size.
  5. Click Next. Select how you intend to use Google Analytics.
  6. Click Create and (if you are setting up a new account) accept the Analytics Terms of Service and the Data Processing Amendment.
  7. Continue to Add a data stream to start collecting data.

Creating a Data Stream

If you are installing any Google Analytics for the first time, you’ll be prompted to create a new data stream based on if it is a web or an app.

  1. Select Web
    Screen_Shot_2021-10-04_at_9.24.30_AM.png
  2. Then, you’ll be prompted to enter details – like your website URL – to set up the new data stream.Screen_Shot_2021-10-04_at_9.25.34_AM.png
  3. According to Analytics Help: You can enable or disable enhanced measurement.

Migrating from UA to GA4

  1. Log in to your Google Analytics account.
  2. Click the Admin icon in the lower-left corner.
  3. Click on GA4 Setup Assistant in the Property column in the center of the window.
  4. Click Get Started in the “I want to create a new Google Analytics 4 property” section.
  5. Click Create and Continue on the Create a new Google Analytics 4 property.
  6. On the Start measuring data section on the Set up a Google tag window, there are two options:
    • Use a Google tag you already have: If you have an existing Google tag, click the Choose a tag button to select the tag. 
      • Select the existing tag you want to convert to GA4 from the list.
      • Click on See your GA4 property to access your new GA4 property.
    • Install a Google tag: If you don't already have a Google tag, or just want to create a new one, click Install a Google tag to create a new one and follow the instructions.

Setting up the Xola Integration

To establish a connection between Xola and GA4, we need to collect your API Secret Key and Measure ID. 

  1. Go to your Google Analytics Admin > Data Streams and open your chosen stream:
  2. Scroll down to the Additional Settings tab and click on Measurement Protocol API secrets; then click Create:
  3. You must create a nickname for your new API secret; we recommend naming this Xola. Click Create.
  4. You will need to copy the Secret value provided. This value will be pasted into Xola when setting up GA4. 

How to get your Measure ID for Xola

  1. Go to your GA4 property and click on Admin on the bottom left.
  2. If you have multiple properties (not common), choose the appropriate Property in the dropdown.
  3. Under Property, click Data streams.
  4.  Click on Web.
  5. Click on the arrow on your Data Stream.
  6. Your Measurement ID is in the top right. Copy this and save it for later.
  7. On the same screen, find the Measurement Protocol API Secrets section and click into it.
  8. Click Create to create a new API Secret.
  9. For the nickname, we recommend using Xola. Click Create.
  10. Copy the Secret value provided and save it for later.

Adding Key and ID to Xola

After collecting your Measurement ID and API Secret, log into your Xola Account. 

Note: For third-party users without admin access in Xola, it is essential to collaborate with the customer to securely add password data and install the app. Please refrain from sending passwords via email, as it is not a secure method of transmission. 

  1. Go to App Store > GA Conversion Tracker
  2. Click on the Install button.
  3. You will be prompted to enter your API Secret Key and Measurement ID. Paste the values you collected earlier from GA4 in here.
  4. Click Continue, and you are done! You should start see conversions in your Analytics account. Please note that similar to UA, there may be a 24 hour lag for conversions to appear.

Mapping data between Xola and GA4

Xola sends various properties about purchases. GA4 refers to these as Dimensions. GA4 allows you to create custom reports with specific dimensions as well as the ability to establish filters on them.

The following is a mapping table that describes all the dimensions Xola sends to GA4.

GA4 Dimension Description
Item name The name of the purchased experience/gift
Item category Xola informs GA4 of each line item from the purchase. This could be a Demographic, or an Add-on.
Item category 2 The name of the "Item category" as configured in Xola (e.g. Adult, Child, Pickup Location)
Item coupon Any coupon code that was used in the purchase
Transaction ID Order/Purchase ID

 

In addition to dimensions, Xola also sends certain Metrics to GA4. Metrics are quantitative measurements such as guest quantity or amount and is always a numeric value.

GA4 Metric Description
Item quantity Count of a particular Item Category (e.g. number of Adults)
Item revenue Earnings from a particular Item Category
Tax amount Tax paid on a purchase

 

How to create Reports

E-commerce Report 

  1. In Google Analytics: Click Reports from the left menu panel & click E-commerce Purchasesbf09a469-3083-4d41-90af-b2696e568068.png
  2. Click Item Name to open a list of optionsfa74bc55-2408-4f92-a496-070863b03fed.png
  3. Select Item Category to display Add-On and Demographic Type ed7a955c-62f3-4db8-b87c-434adb020b33.png

Custom Report

Before we get into the how part, for those who will be using universal analytics alongside the GA4 until July 1 2023, you might see a difference in the revenue displayed in universal analytics vs Revenue displayed in GA4, This is due to the fundamental change in the way the revenue is calculated in GA4.

In Universal Analytics, the Revenue is calculated as follows:

  • Revenue = Item x Qty + Tax - Discount (if any)

In GA4, Google Calculates Revenue:

  • Revenue = Item x Qty

So to get a comparable value to Universal Analytics, you will have to Add Tax & subtract the discount amount, if any, from the Revenue amount displayed in GA4.

Steps to Create Custom Reports

  1. Select Explore Tab from the left menu and click Blank Card.8e16e49c-cb39-4c37-a622-ebb6eb7ecb7c.png
  2. Give a name to the Custom Report and then click + sign to add Dimensionsce6d4d10-fdff-4e40-9127-ffaba96efce8.png
  3. Search and select the dimensions and then click Import.
  4. To import the required dimensions, check the below screenshot to verify.abf9da41-a325-4ea0-b0c9-fd75f165b53d.png
  5. Now import Metrics the same way you did dimensions in steps 3 &4 
  6. Drag & Drop Dimensions & Metrics into the sections as indicated below to get the below view of the report.3378359b-d8ec-4cec-b182-f5768dd42593.png

For information on reports in Google Analytics, click here. 

Troubleshooting

  • Make sure you copy and paste the Gtag.js tag verbatim to your website. DO NOT copy it first to a Word or Google Doc; copy and paste it from there to your site. This can add extra spaces or characters that will cause it to break.  
  • Make sure you add the Gtag.js code into your opening head or use a Google Analytics-approved plugin through your CMS (like WordPress).
    If you set it up through Google Tag Manager, ensure it is configured and tracking correctly. 
  • You can use the Google Tag Assistant free Chrome plugin to verify that the tag works.



Was this article helpful?
0 out of 3 found this helpful