Stape
Search
Try for free

Google Tag Manager server-side tracking as an alternative to Zapier

Updated
Sep 17, 2024
Published
Oct 25, 2020

Zapier is the most popular software that helps connect your apps and automate workflow. It became the number one tool in this niche, but using Zapier may be too expensive for some businesses since it limits the number of tasks and events you can send in each plan.

This article will review how to automate workflows and use the Google Tag Manager server-side container to replace the popular Zapier features such as automatic Slack notifications and Google Sheets integration. We also consider Generic API Call, a solution for those who need to create specific automation cases and don’t want to be restricted by templates.

What is Google Tag Manager server-side tracking?

Server-side container is a feature from Google Tag Manager that moves third-party pixel execution into the cloud server. A server GTM container is part of Google Tag Manager's server-side tracking framework. It runs on a server instead of operating in the client’s browser. 

Processing tags and collecting data on the server side enhances performance, boosts security, and increases data accuracy.

Check our blog post on what Google Tag Manager server-side tracking is and how to set it up.

Advantages of server-side tracking over Zapier

If you want to prevent data loss inside analytics tools (like Google Analytics 4) caused by Ad Blocker and ITPs, you may be interested in switching to server-side tracking.

One advantage of using GTM Server-Side is that you can use non-public keys and passwords for your services in tag configuration. This is possible because tags are not processed inside the browser; nobody can see them except you.

This feature allows companies to cut expenses on Zapier and use only Google Tag Manager server-side containers. GTM server is not a free tool, though. Using native GTM server integration, you’ll pay a minimum of $120/month for Google Cloud Servers. Alternatively, using our service, you can set up a GTM server container for free. At Stape, we have free and paid plans (based on your website traffic volume). You can find more information on prices and features on the pricing page.

Still, server-side tracking will open many new possibilities for your website. The most important are complete data inside Google Analytics, higher site page speed, and secure data. With paid plans, you’ll have additional benefits. 

Server-side trackingZapier
FlexibilityHigher flexibility, you can easily set up integrations according to your needs You are limited by the setting of Zapier, so you can’t send specific data about users
Data securityHigher data security as website visitors’ data is being proceeded on your serverLower data security as all the requests proceeded on the client’s side (in the browser) 
Data qualityEnhanced data quality, as server-side tracking bypasses ad blockers and browser restrictionsNo additional features to enrich and protect data
Ease of setupRequires GTM knowledge to configureEasier to set up
CostFor low-traffic websites (less than 100, 000 requests/month), you won’t need to payA limited number of tasks per month are free (100 tasks per month)
Read more about the benefits of server-side tracking in our blog post.

What you need to do to replace Zapier with sGTM

To benefit from server-side tracking, you need to:

You can find detailed instructions on how to set up server GTM tracking in our article.

Send Slack notifications

There are specific actions on your website that require your team to react immediately. These can be new orders, user registrations, helpdesk tickets, etc. Slack notifications about these activities may streamline your business process, document all events in one place, and make your team members react quickly.

!

Please note:

The instructions below assume that the server GTM container has the required event information; if not, check our article on sending Slack notifications to server GTM and follow steps 3-6.

1. Add the Slack Notification tag to your GTM workspace.

Add Slack Notification tag to workspace

2. Go to the Tags section in server GTM and click "New".

Add new tag in server GTM

3. Choose "Slack Notification" as the Tag Configuration.

Slack Notification tag in server GTM

4. Go to Slack App → Create an App → From scratch → Name your app and select Slack Workspace.

Create app from scratch

5. Click on the "Incoming Webhooks" section → Activate the Incoming Webhooks toggle to switch it on.

Incoming webhooks in Slack

6. Click "Add New Webhook to Workspace" and select the channel to which you want to send notifications.

Add new webhook to workspace

7. Copy Webhook URL.

Copy webhook URL

8. Paste the Webhook URL and add the notification text (text that will be sent to Slack).

Webhook URL in Slack tag

9. Add the trigger for a tag, as shown in the screenshot below.

Trigger for Slack tag

10. Open the Preview and Debug mode of the Web and Server containers and test if the notification works.

Preview and Debug Mode in GTM

Google Sheets integration

Google Sheets is an easy-to-use platform for tracking complex business processes. You can record sales or leads from your website into Google Sheets. You can also enrich data with additional parameters, such as UTM tags, traffic sources, order information, etc.

!

Note:

You need to have a Firestore account to set up a Google Sheets tag

Step 1: Google Service Account power-up

1.1 In the server GTM container, go to the power-ups section → click "Configure" next to "Google Service Account".

Google Service Account power-up in Stape

1.2 Login to Google Cloud account → click IAM & Admin → Service Accounts → Create service account.

Create a service account in the Google Cloud Platform

1.3 Add account → click Next → select Cloud Datastore User role for Firestore.

Cloud Datastore User role for Firestore

1.4 Open Google Service Account → Keys tab → Add key → select JSON type → Create.

Key type JSON

1.5 Upload a Key to the Google Service Account power-up.

Google Service Account power-up in Stape

Step 2: Google Sheet Authentication

2.1 Go to Google Cloud Account.

2.2 Select API & Services → Credentials → Create Credentials.

Create credentials

2.3 Select "Create OAuth Client ID" → Configure Consent Screen.

Configure consent screen

2.4 Enable Google Sheets API.

2.5 Click Add or Remove Scopes → Select Google Sheets API → Save.

Google Sheets API

2.6 Go back to Credentials → Create Credentials → OAuth Client ID → Web Application.

Web Application

2.7 Add Authorized Redirect URIs

2.8 Copy Client ID and Client Secret.

2.9 In Stape Account, find "Tools" section → Google Auth Helper → add "Client ID" → Auth Scope: Google Sheets.

Click "Start Authorization".

Google Auth Helper

2.10 Select the Google Account → add Client ID, Client Secret, Auth Code will be generated for you → Click Generate Refresh Token → Copy refresh Token.

Step 3: Firebase account

3.1 Login to Firebase → Create Project → select the same project you’ve used to create Google Service Account → Continue → Add Firebase.

3.2 Click Build → Firestore Database.

Firestore Database

3.3 Click Create Database → Start in production mode → Next.

Start in production mode

3.4 Select Cloud Firestore location, and make sure it matches sGTM server location (you can check server location in your GTM container in Stape admin).

3.5 Click Start a Collection → set Firebase Path → click "Save".

Firebase Path

Step 4: Google Sheets tag

Google Sheets tag in GTM Template Gallery

4.2 Go to "Tags" section → click "New" → add "Spreadsheet" as tag configuration.

Spreadsheet as tag configuration

4.3 Configure the tag.

This tag allows Adding a row or Updating cells → Select Rows range → Add Sheets URL → Add API Refresh Token, Client ID, and Client Secret.

Spreadsheet tag configuration

4.4 Add cell value that should be sent to Google Sheets. Add Firebase Path. You can check how to do it in Step 3: Firebase account section above.

4.5 Add a trigger for a tag.

Generic API Calls for workflow automation

If you don’t want to be limited by templates, you can do custom HTTP requests on server-side GTM the same way you do on Zapier. Such requests enable you to speak to most APIs out there, including your internal ones.

To create complex workflow automation, you can use our JSON HTTP Template. Once configured, the tag sends an HTTP request to your URL with the payload you can configure off of Event Data. Tag allows you to send POST/PUT/PATCH requests and customize the body and headers.

Check out our blog post on how to use the JSON HTTP Request tag.

Conclusion

Server-side tracking is among the alternatives to Zapier. This type of tracking has many advanced features that will help obtain more precise data, provide higher data protection, and more. With the help of tags available for server GTM, you can create automated workflows and automate routine tasks (e.g., tracking events on the website, receiving notifications in Slack or collecting data in Google Sheets).

This tool is not one of the free alternatives since you’ll use Google Cloud Servers to send events. However, using the GTM server will help you cut down on the cost of other services. Ultimately, the cost savings are greater than the cost of Google Cloud, which makes it particularly appealing to companies. And the fact that it offers first-party cookies is the icing on the cake.

Tagged with:gtm server

Try Stape for all things server-sideright now!