Stape

Google Ads offline conversion using server GTM

Updated
Mar 21, 2024
Published
Oct 30, 2022
Also available in

Google Ads offline conversion was initially designed to track actions that accrue not on your website. It can be orders by phone, in-store orders, etc. Since the beginning, Google Ads offline conversions have been essential for companies with a significant percentage of offline sales. 

With the recent tracking restrictions, like iOS 14/15, using offline conversions to measure Google Ads campaign results might be the only way to accurately track actions after users see or click your Google Ad. 

Want to know how to set up Google Ads offline conversion tracking using server Google Tag Manager? Look no further! This blog post will show you how to use the sGTM container to send offline conversions to Google Ads. This will allow you to track and attribute sales to Adword campaigns.

What are offline conversionsCopy link to this section

Offline conversions are sales or leads that can be attributed to a Google Ads campaign, even though they occur offline (i.e., not on the website where the ad was clicked). For example, if you run a Google Ads campaign for your brick-and-mortar store and someone sees your ad, then comes into your store and makes a purchase, that would be an offline conversion. 

Another example of an offline conversion would be if you run a Google Ads campaign for your law firm, and someone sees your ad, then calls your office to schedule a consultation. In this case, the lead would be attributed to your Google Ads campaign even though the actual conversion (scheduling the consultation) occurred offline. 

Google has been relying more heavily on machine learning and modeling in recent years. For example, with the release of Google Analytics 4 last year, they introduced GA4 integration with Signals, which helps with cross-device user tracking based on data of people who logged in to their Google accounts. In GA4, you can also enable data modeling that will help track users who do not allow using cookies or opt-out of tracking.

Google’s data modeling relies on machine learning. When a user agrees to use cookies or allows apps to track them, Google is allowed to observe and report user actions on the site. They call it observed data. When Google cannot track people, it uses the information they learn from observed data to build Modeled data.

Since modeled data uses machine learning, there is a list of criteria that your GA4 property has to meet to be eligible for enabling modeling. The main reason is that machine learning is valid when it observed significant amounts of data. The principal criteria are:

  • Consent mode must be enabled.
  • At least 1,000 events/day with analytics_storage='denied' during the last 7 days.
  • At least 1,000 users/day have analytics_storage='granted' for at least 7 of the previous 28 days.


google analytics 4 modeling 

Since tracking restrictions have been rising during the last several years, some research shows that you can miss more than 30% of data in your analytics tool or advertising platforms. 

Saying all that, Google Ads offline conversion might not only be the way to track users who converted offline but also an accurate way to track online conversion without relying on machine learning algorithms.

Benefits of Google Ads offline conversionsCopy link to this section

  • Allows tracking and attribution of events that happened offline (e.g., in-store or over the phone).
  • Reports more accurate ROI
  • Allows feeding 1st party data to Google and attribute conversions of those users who either opted out of tracking or used adBlockers
  • Allows seeing behavior conversion tracking without event modeling data.

To set up gAds offline conversions in sGTM you need:Copy link to this section

Google Ads offline conversion tag uses Firebase for authentication and Google Ads developer's account. We simplified the process of creating these two entities for Stape users, which is why the list of needed things to set up Google Ads offline conversions depends on whether you are a Stape user. 

1. Google Service AccountCopy link to this section

Skip this step if you have already connected your google service account to the Stape sGTM container. 

     1.1 Login to Stape account -> open the sGTM container that you want to set up the Google Ads Offline conversion tag for -> Click Power-Up -> Google Service account 

add google service account stape

     1.2 Login to the Google Cloud account (or create one) -> From the Navigation menu, click IAM & Admin -> Service Accounts -> Click Create service account

Create service account google cloud

     1.3 Add account -> Click Next -> Select Roles. To set up the Google Ads offline conversion tag, we need to use Firebase. Select the Cloud Datastore User role for Firestore.

     1.4 Open Google Service Account you’ve recently created -> Open the Keys tab -> Click Add Key -> Select JSON type in the popup -> Click create. A file will be downloaded to your computer. 

generate key firebase 

     1.5 Go to your stape.io account -> open Google Service Account power up -> upload the Key you’ve downloaded on the previous step -> click Save. 

2. Create a Firebase accountCopy link to this section

Skip this step if you already create a Firebase path for Google Ads offline conversions. 

     2.1 Open Firebase -> click Create Project -> Select the same project you’ve used to create Google Service Account  -> click Continue -> Click Add Firebase on the third step.     

     2.2. Click Build -> Firestore Database

Build Firestore Database

     2.3 Click Create Database -> select Start in production mode -> Click Next.

     2.4. Select Cloud Firestore location. It should match your sGTM server location. To check the sGTM server location, go to your stape.io account -> Open the sGTM container -> check the Server Location. To match the sGTM server location with Firebase, please check this link.   

     2.5 Click Start a collection. Here you will need to set Firebase Path that lately will be used in gAds tag. I’ve added Firebase Path to stape/gads-offline-auth -> Click Save.

Start a collection firebase

3. Google Ads AuthenticationCopy link to this section

     3.1 Login to your Google Cloud Account.

     3.2 Select API & Services from the main menu -> Click Credentials -> Click Create Credentials.

Create Credentials

     3.3 Select Create OAuth Client ID -> Click Configure Consent Screen.

     3.4 Select Internal - if Google Ads is located inside your google cloud organization. External - if it’s outside the Google Cloud organization.

     3.5 Enable Google Ads API using this link.

     3.6 Click Add or Remove Scopes -> Select Ads API. If you do not see Google Ads API, then make sure you’ve enabled Google Ads API. Add a Test user if needed. Click Save. 

Add or Remove Scopes

     3.7 Once you are done with OAuth Consent Screen, go back to Credentials -> Click Create Credentials -> OAuth Client ID -> Select Web Application

     3.8  Add Authorized redirect URIs https://app.stape.io/integration/google/callback  if you use Stape global and https://app.eu.stape.io/integration/google/callback if you use Stape EU -> Click Create.

Add Authorized redirect URIs 

     3.9  You need to add the email of the Google Account that will authenticate your app to the test users of your application. After you have completed your setup and made sure that everything works as expected, please change consent screen publishing status from “Testing” to “In production” by clicking “Publish app”. It is required as in testing publishing status refresh token will expire within a week. And there is no need to verify it. 

add test users

     3.10 You will see your Client ID and Client Secret on the next page. Make sure to copy these values.  

     3.11 Go to your stape.io account -> Click Tools -> Select Google Auth Helper -> Add Client ID -> Click Start Authorization -> Select Google Ads

google ads offline authorisation

     3.12 Select the Google Account. Please make sure to use the Google account that has access to the Google Ads account you want to set up the Google Ads Offline conversion tag for -> On the second step, add Client ID, Client Secret, and Auth Code will be generated for you -> Click Generate Refresh Token -> Copy Refresh Token. 

If you do not use Stape, you will need to also get Google Ads developers token following these instructions.

How to set up Google Ads offline conversion tagCopy link to this section

2. Send data to the server GTM container. The two most popular sending data to sGTM are Google Analytics 4, Data Tag/Data Client, or Webhooks

3. Download the Google Ads tag from GitHub -> Open templates sections in the server Google Tag Manager container -> Click New.

4. Click three dots in the top right corner -> Click Import -> Select the Google Ads tag template you’ve recently downloaded from GitHub -> Click save.

import google ads offline tag to sGTM

5. Create Google Ads Offline Conversion tag

Conversion Action ID - refers to the conversion ID you want to use to track offline conversions. 

Earlier in this article shows how to generate a Client ID, Client Secret, and API Refresh Token.

Operating Customer Id - Google Ads account ID.

Customer ID - your Google Ads MCC account ID. 

If you use Stape, add your Stape Container API Key. You can find it in the sGTM container settings. If you do not use Stape, add your Google Ads developer token.

Conversion Environment - Conversion environment of the uploaded conversion. Conversion environment should be UNSPECIFIED.

Conversion DateTime - The date-time at which the conversion occurred. It must be after the click time. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g., "2019-01-01 12:32:45-08:00". If not set, the current time will be used.

Gbraid - The click identifier for clicks associated with app conversions and originating from iOS devices starting with iOS14.

Wbraid - The click identifier for clicks associated with web conversions and originating from iOS devices starting with iOS14.

Gclid - The Google click ID (gclid) is associated with this conversion.

You can customize tags by adding Conversion Custom Variables, Cart Data, and User Data.

Inside Firebase Settings, add Firebase Path that was generated on this step. 

google ads offline conversion tag Server GTM

Conclusion:Copy link to this section

Offline conversion data tracking is the process of measuring how customers interact with your business offline. This includes people who visit your website but don’t purchase anything, people who call you after seeing one of your ads, and even people who visit your physical location. 

By tracking this data, you can better understand how well your advertising campaigns are performing and whether or not you should be increasing your budget. We've walked you through the steps in this blog post, but if you need help setting it up, don't hesitate to reach out to us. We'd be happy to assist! 

Need help with setting up server-side tagging?

All it takes is a few simple questions. Click Get assistance, fill-up the form, and we will send you a quote.

Get assistance

Host your GTM server at Stape