Abhishek Singh, a seasoned Competency Head - Microsoft, leverages Microsoft technologies to drive project success and foster business growth. As a Senior Tech Lead at Cynoteck, he brings over a decade of experience, primarily in Microsoft Stack technologies, with a 13+ year career in software development, specializing in Dynamics 365 and the .NET Framework. Abhishek Read More
We are Microsoft Gold partner with its presence across the United States and India. We are a dynamic and professional IT services provider that serves enterprises and startups, helping them meet the challenges of the global economy. We offer services in the area of CRM Consultation and implementation, Application development, Mobile application development, Web development & Offshore Development.
The Google Analytics Measurement Protocol (GAMP) is an API (Application Programming Interface) endpoint that allows developers and organizations to send data to Google Analytics servers directly. You can send data to Analytics using this Measurement Protocol from any device that has an internet connection.
This can be helpful when sending data from a kiosk, a point-of-sale system, or anything else other than a mobile app or website. Because, while the Analytics JavaScript and mobile SDKs (Software Development Kit) create hits automatically to submit data to Analytics from webpages and mobile apps, you must create data collecting hits manually for other types of devices.
This is when the measurement protocol is helpful. The Measurement Protocol specifies how hits are created and sent to Analytics. For example, submit data from your cash record machine to track offline conversions. For this interaction to work, you will need to format your data according to Google's measurement process. You will not be able to send data to Google Analytics without it.
Measurement Protocol consists of a set of essential and optional parameters. The following are required:
v - protocol version (currently 1).
tid - tid is the GA resource's tracking ID, to which you will transmit the collected data.
cid - cid is for client ID.
t - t stands for the type of user interaction with the website. For instance, a page view, a screen view, an event, a transaction, and so on.
The Google Analytics Measurement Protocol allows making HTTP requests to send events directly to Google Analytics servers. Developers can use these measurement protocols to see how users interact with their business in any HTTP-enabled environment.
The Measurement Protocol has two elements for transmitting data to Google Analytics:
The HTTPS protocol should be used for all data transmissions.
Payload Data
Google Analytics sends all data collected via the Measurement Protocol as a payload. Each parameter has a key and value, is separated by a = character, and each pair is delimited by a & character, like a URL query string. Consider the following scenario:
key1=val1&key2=val2
Required values, URl encoding, parameters that can be sent concurrently, and parameter length are all governed by rules in each payload. In addition, each parameter has a specific type that requires a certain format. In the following section, these regulations are discussed in more detail.
Required Values for All Hits
Each payload must include the following parameters:
Data such as Client ID and Hit Type are directly mapped to the Google Analytics data model.
The Protocol version. '1' is the current value. This will only change if the changes made are not backward compatible.
Tracking ID/ Web Property ID
The tracking ID/web property ID. UA-XXXX-Y is the format. All collected data is associated with this ID.
Hit type
The type of hit. The event type must be 'pageview', 'transaction', 'screenview', 'item', 'exception', 'social', or 'timing'.
Screen Name
This parameter is optional on web properties but essential for screen view hits on mobile properties, where it is used for the 'Screen Name' of the screen view hit. On web properties, this defaults to the page's unique URL, which is determined by either utilizing the &dl parameter as-is or assembling it together from the &dh and &dp parameters.
Custom dimensions are like default dimensions in your Analytics account, with the exception that they are created by you. By using them, you can collect and evaluate data that is not automatically tracked by Analytics.
There is an index for each custom dimension. There is a maximum of 20 custom dimensions available (200 for Analytics 360 accounts). A positive integer between 1 and 200, inclusive, must be used as the dimension index.
The following settings are used to send custom dimension data:
Custom Metric
There is an index for each custom metric. There is a total of 20 custom metrics that are available (200 for Analytics 360 accounts). A positive number between 1 and 200, inclusive, must be used as the metric index.
Summary
This post explained what Measurement Protocol is, how it can help your business, and how to set it up and validate your hits properly. Furthermore, you have seen the case of tracking offline data to Google Analytics, as well as some significant hits. We hope that after reading the above blog, the measurement protocol is no longer a frightening word and that you are ready to start tracking crucial data for your business.
Please contact us if you require any assistance or would like to discuss ways to improve your tracking and analytics setup. We help clients of various fields and sizes, providing high-quality results.
The Google Analytics Measurement Protocol (GAMP) is an API (Application Programming Interface) endpoint that allows developers and organizations to send data to Google Analytics servers directly. You can send data to Analytics using this Measurement Protocol from any device that has an internet connection.
This can be helpful when sending data from a kiosk, a point-of-sale system, or anything else other than a mobile app or website. Because, while the Analytics JavaScript and mobile SDKs (Software Development Kit) create hits automatically to submit data to Analytics from webpages and mobile apps, you must create data collecting hits manually for other types of devices.
This is when the measurement protocol is helpful. The Measurement Protocol specifies how hits are created and sent to Analytics. For example, submit data from your cash record machine to track offline conversions. For this interaction to work, you will need to format your data according to Google’s measurement process. You will not be able to send data to Google Analytics without it.
Measurement Protocol consists of a set of essential and optional parameters. The following are required:
v - protocol version (currently 1).
tid – tid is the GA resource’s tracking ID, to which you will transmit the collected data.
cid – cid is for client ID.
t – t stands for the type of user interaction with the website. For instance, a page view, a screen view, an event, a transaction, and so on.
The Google Analytics Measurement Protocol allows making HTTP requests to send events directly to Google Analytics servers. Developers can use these measurement protocols to see how users interact with their business in any HTTP-enabled environment.
The Measurement Protocol has two elements for transmitting data to Google Analytics:
The HTTPS protocol should be used for all data transmissions.
Payload Data
Google Analytics sends all data collected via the Measurement Protocol as a payload. Each parameter has a key and value, is separated by a = character, and each pair is delimited by a & character, like a URL query string. Consider the following scenario:
key1=val1&key2=val2
Required values, URl encoding, parameters that can be sent concurrently, and parameter length are all governed by rules in each payload. In addition, each parameter has a specific type that requires a certain format. In the following section, these regulations are discussed in more detail.
Required Values for All Hits
Each payload must include the following parameters:
Data such as Client ID and Hit Type are directly mapped to the Google Analytics data model.
The Protocol version. ‘1’ is the current value. This will only change if the changes made are not backward compatible.
Tracking ID/ Web Property ID
The tracking ID/web property ID. UA-XXXX-Y is the format. All collected data is associated with this ID.
Hit type
The type of hit. The event type must be ‘pageview’, ‘transaction’, ‘screenview’, ‘item’, ‘exception’, ‘social’, or ‘timing’.
Screen Name
This parameter is optional on web properties but essential for screen view hits on mobile properties, where it is used for the ‘Screen Name’ of the screen view hit. On web properties, this defaults to the page’s unique URL, which is determined by either utilizing the &dl parameter as-is or assembling it together from the &dh and &dp parameters.
Custom dimensions are like default dimensions in your Analytics account, with the exception that they are created by you. By using them, you can collect and evaluate data that is not automatically tracked by Analytics.
There is an index for each custom dimension. There is a maximum of 20 custom dimensions available (200 for Analytics 360 accounts). A positive integer between 1 and 200, inclusive, must be used as the dimension index.
The following settings are used to send custom dimension data:
Custom Metric
There is an index for each custom metric. There is a total of 20 custom metrics that are available (200 for Analytics 360 accounts). A positive number between 1 and 200, inclusive, must be used as the metric index.
Summary
This post explained what Measurement Protocol is, how it can help your business, and how to set it up and validate your hits properly. Furthermore, you have seen the case of tracking offline data to Google Analytics, as well as some significant hits. We hope that after reading the above blog, the measurement protocol is no longer a frightening word and that you are ready to start tracking crucial data for your business.
Please contact us if you require any assistance or would like to discuss ways to improve your tracking and analytics setup. We help clients of various fields and sizes, providing high-quality results.