Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Skip to main content

Guidance for Using Google Tag Manager for Server-Side Website Analytics on AWS

Enhance real-time data analytics to get better insights on website interactions

Overview

This Guidance helps you implement server-side tagging to collect event data and perform data analysis in near real-time. You can then ingest this data to both AWS and Google Analytics™ services. Server-side tagging is a new way to use Google Tag Manager to instrument your application across devices. Server containers use the same tag, trigger, and variable model that customers have already been using, while also providing new tools that allow you to measure user activity. This Guidance deploys a Google Tag Manager server-side container to Amazon Elastic Container Service (Amazon ECS) and provides the necessary infrastructure to collect event data from a test website and emit event data to AWS analytics services.

How it works

How it works

This architecture diagram demonstrates how to use Amazon API Gateway to build a near-real time website activity data collection and analytics stack on AWS with Google’s Server Side Tagging Service.

Architecture diagram showing the integration of AWS services (such as Amazon Route 53, API Gateway, ECS, Lambda, Kinesis Data Streams, Data Firehose, S3, Athena, QuickSight, Glue, OpenSearch, Personalize, and SageMaker) with Google Tag Manager in a server-side analytics solution stack for collecting and analyzing website events data.

How it works

This architecture diagram demonstrates how to use Amazon Kinesis Producer Service to build a near-real time website activity data collection and analytics stack on AWS with Google’s Server Side Tagging Service.

Architecture diagram illustrating the integration of Google Tag Manager server-side analytics with AWS services, including AWS Kinesis, Lambda, Amazon ECS, S3, Athena, OpenSearch, QuickSight, and related components for analytics data collection, transformation, and visualization.

Deploy with confidence

Everything you need to launch this Guidance in your account is right here.

We'll walk you through it

Dive deep into the implementation guide for additional customization options and service configurations to tailor to your specific needs.

Let's make it happen

Ready to deploy? Review the sample code on GitHub for detailed deployment instructions to deploy as-is or customize to fit your needs.

Well-Architected Pillars

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.