Recurring revenue analytics is the analysis of the sales generated through recurring products/services. The recurring revenue is often collected in the form of subscription payments.
Since subscription payments (other than the first payment) are not triggered by a user’s actions, they need to be tracked server-side.
When a user first signs up, assign him a unique user id. You can use the login id as a user id. Just make sure that the id does not contain Personally Identifiable data like name, email address, IP address, etc.
Any data that allows Google to personally identify an individual or data that permanently identifies a particular device (such as a unique device identifier, if such an identifier cannot be reset) is Personally Identifiable data.
If you upload any data that allows Google to personally identify an individual, your Google Analytics account can be terminated, and you may lose your Google Analytics data as this is against Google Terms of Service.
The user id is used, to sum up the recurring revenue by a user. When a user makes the first initial purchase you can set a unique user id for him and note down his transaction ID. For second and subsequent purchases, send transaction data (with unique transaction ID) to Google Analytics via measurement protocolwhenever you process payment.
When a subscription stops then stop sending the transaction data via measurement protocol for a particular user.
About measurement protocol
The measurement protocol is a set of rules which your application must follow in order to send raw hit data directly to the Google Analytics server.
Through this protocol, you can collect and send raw user interaction data (hits) directly to the GA server from any device/system which can be connected to the internet. This device/system can be a smartphone, tablet PC, digital appliances (washing machine, coffee machine, slot machine), point of purchase systems, etc.
However, you need to format your data according to the measurement protocol before you can send it to the Google Analytics server. So for example, if you want to send data from a cash counter machine, coffee machine or slot machine then you first need to format the data according to the measurement protocol. Without such formatting, you can’t send data to GA.
In order to make an HTTP request to the GA server (for sending the raw hit data directly), you need to format your HTTP request according to the measurement protocol. This formatted HTTP request is called the measurement protocol request.
Here is what the measurement protocol request looks like:
The measurement protocol request is made up of: user-agent, transport and payload data:
Payload data is the data you send to the Google Analytics server using the measurement protocol. In other words, the payload data is the data that has been formatted according to the Measurement Protocol.
Payload data is made up of multiple parameters. Each parameter is made up of ‘key = value’ pairs. Each parameter is separated from another parameter via & character.
Since each parameter is made up of ‘key = value‘ pairs, so each ‘key=value’ pair is separated by the ‘&’ character.
Note (2): All protocol parameters must be set on the same line. They should not have any spaces between them. Comments are not allowed in protocol parameters.
The measurement protocol supports the following data types for the values in the ‘key = value’ pairs of the payload data:
Integer – used to represent a number
Text – used to represent a string
Boolean – used to represent a boolean value (true or false)
Currency – used to represent the total value of a currency in up to 6 decimal points.
Transport defines where and how to send the payload data.
Following is an example of transport:
POST http://www.google-analytics.com/collect
Transport is made up of:
#1 GET/POST method – which defines how to send the payload data
#2 Location of the GA server – which defines where to send the payload data
#3 URL endpoint – this is used to define whether a single or multiple hits should be sent to the GA server or whether to send the payload data to the measurement protocol validation server.
There are rules regarding which parameters can be sent together and which parameters can’t be sent together. There are rules regarding the length and format of parameters.
Each parameter has a specific type that requires a particular format.
Each payload data must contain a valid hit type. Each hit type must have its own set of required parameters set.
You can send payload data by either using the GET method or POST method.
Google recommends using the POST method, as then you can send larger payload data to the GA server. The location of the GA server is https://www.google-analytics.com. This is where we send the payload data.
The payload data need to be URL encoded if you are making an HTTP POST request to the GA server.
The size of Payload data, if you are making an HTTP POST request to the GA server can be a maximum of 8191 Bytes. However, if you make an HTTP GET request to the GA server, then the size of payload data cannot be more than 2000 Bytes.
Write a script to make the following similar HTTP POST request to the GA server in order to send the payload data:
User-Agent: user_agent_string
POST https://www.google-analytics.com/collect?payload_data
Note: GA hit builder uses only one URL endpoint, /collect
To use the measurement protocol, you need to do the following three things:
#1 Ask your developer to write an application (program) that can pull data from your desired data source (could be your database/backend):
#2 Your application must convert the retrieved data into the payload data according to the measurement protocol:
#3 Your application must make an HTTP POST request to the endpoint (Google Analytics server) in order to send the payload data to the GA server. The HTTP request should be made up of user agent, transport and payload data:
When GA receives the HTTP request from your application, it tries to process the payload data in the HTTP request. If GA successfully processes the payload data then its server will send 2XX response code back to your application:
If GA is not successful, in processing the payload data, then its server does not send any error code back to your application.
As you create monthly invoices for our customers, you could have a request sent through the measurement protocol which specifies the invoice details as soon as the payment comes in as successfully processed.
Recommendation regarding updating the original transaction
Do not update the original transaction every month. Assign a unique transaction ID for each new transaction for a particular user.
If you update the original transaction with new value then you won’t be able to see individual transactions for a particular user over time.
If you don’t assign a unique transaction ID for each new transaction for a particular user then you will have duplicate transaction issues.
By doing that you can segment anyGA report by user id custom segment and do detailed analysis for a particular user. If some of your customers book well in advance, say 2 months in advance then send transaction data via measurement protocol after 2 months to maintain the accuracy of the sales data.
Record sales only on the day of the actual sales whether the sale is user-generated or generated by you in response to billing.
Get my best selling books on Attribution Modelling
Learn to implement attribution modelling in your organisation
Understand the customer purchase journey across devices
Determine the most effective marketing channels for investment
Click book covers to find out more
Recommendation for refunds, chargebacks, and unsuccessful payments
When sending transaction data via measurement protocol, add a negative amount for the sales. This is known as reversing the transaction.
When you reverse a transaction in Google Analytics, it doesnot remove it. GA simply deduct a particular amount from the revenue total. So what is removed is the revenue/sales associated with the reversal transaction. No other information associated with the transaction is removed.
For example,
Let’s say User ‘A’ placed an order of $200 on Monday.
Let’s say the total website sales on Monday were $500.
Now if you reverse the transaction on Monday, then the total sales amount for Monday would be reported to be: $500 – $200 = $300
If you reverse the same transaction on say Tuesday, then the total sales amount for Monday would remain $500
the total sales amount for Tuesday would be: Total website sales for Tuesday – $200
So if the original transaction occurred on Monday and you reversed it on Tuesday then make sure that you are analyzing a date range that includes both Monday and Tuesday. Google, in fact, recommends doing the reversal on the same day as the original transaction.
Note: Both the original and reversal transactions will be included and reported in the transaction count.
"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."
Here’s what we’re going to cover in this training…
#1 Why digital analytics is the key to online business success.
#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.
#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.
#4 Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.
#5 The number 1 reason why conversion optimization is not working for your business.
#6 How to advertise on any marketing platform for FREE with an unlimited budget.
#7 How to learn and master digital analytics and conversion optimization in record time.
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
Learn and Master Google Analytics 4 (GA4) - 126 pages ebook
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.