Using Google Analytics Measurement Protocol Hit Builder

In this article, you will learn to use the Google Analytics Measurement Protocol Hit Builder to create & validate payload data. By using the hit builder tool, you can skip encoding URLs.

If you are brand new to measurement protocol, then read the following article first: Understanding Google Analytics measurement protocol.

In this article, I will show you, how to use the measurement protocol hit builder to create and validate payload data.

The best and easiest way to create and test payload data is by using the measurement protocol hit builder tool.

By using the hit builder tool, you can skip encoding the URLs and other types of data. The probability of creating valid payload data will be very high if you use the hit builder tool.

Follow the steps below to create and validate payload data for sending pageview data to Google Analytics via the measurement protocol:

Step-1: Navigate to measurement protocol hit builder tool: https://ga-dev-tools.appspot.com/hit-builder/

Step-2: Click on the ‘click here to authorize’ button:

measurement protocol hit builder

Step-3: Sign in with your Google account. Once you signed in, you can technically use the hit builder tool.

Step-4: Click on the ‘Add parameter’ button and add various hit parameters:

hit-parameter-details

Step-5: Scroll up (within the hit builder tool) and then click on the ‘Validate hit’ button:

valid-hit

You should now see the ‘Hit is Valid’ message:

hit-is-valid

Note: If the hit is not valid, then you won’t be able to send it to Google Analytics.

Step-6: Click on the ‘Send hit to Google Analytics’ button (shown above) and then check the GA real-time report, to see the pageview hit you sent via the measurement protocol:

testing-page-tracking

If you have created payload data outside of the hit builder tool, you can also validate that payload via the hit builder.

Just copy-paste the payload data you want to validate in the ‘Hit payload’ text box and then click on the ‘Validate Hit’ button:

copy-paste-payload

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade