Calculate Commission Revenue with GTM and Analytics

See how much you really earn

29.11.2016  |  Markus Kehrer  |  Tag1, Tag2, Tag 3

Imagine you work for a company that doesn’t sell self produced products or services, but resell those products from the builder to the customer. What you will get as an effort is the so called commission (pr provision). Today this kind of work is pretty common, since a lot of online portals or Ecommerce communities pop up, like for example. Although the principal of a commission itself is a pretty old technique.

Imagine further you run a online shop that offers seller different types of commission packages to sell their products and that offers buyers a direct shopping system. And of course your are tracking it with Google Analytics and Tag Manager. What you will see in your Ecommerce-Report after selling a product is not the commission but the revenue generated from the transaction. For sure you will know that this number is far away from the commission you will get. So is it possible to display this number as well? Yes it is. So follow me into the instructions. All you need is a little bit of work in Tag Manager and Analytics.

Reseller Concept

First Things first

Since you run a Ecommerce shop, there should be some sort of Tag that gets pushed after a user bought something in your shop. This Tag sends the transaction data to Analytics and you should be able to also send some Custom Dimensions or Metrics with it. If don't, here is a the documentation of how to do it.

One of these Custom Dimensions should be the name of the Package, the seller owns. For example „Basic Package“ or „Premium Package“. In this case just create another Lookup Table Variable in the Tag Manager and give the Package Name as an input. The outcome should be the percentage of the commission, like 5 or 10 (5% from the product revenue is the commission). Name this variable something like „Package Provision“.

Optionally your could simply create a Custom Metric that tells just the percent number of the commission, like 5 or 10. Depends on how you use the data later one. For a more simple solution go with this Metric.

All that's left for you to do in the Tag Manager, is to give the Metric we just created with your Transaction Tag, so that i will be led forward to Analytics. Open the Tag and click on „More Settings“. Now you can insert your Package Provision Lookup Table (or Custom Metric) into the Custom Metrics Field. Be sure not to copy it into Custom Dimensions, because the commission amount is a number and therefore a Metric. Save it and publish your container. Congratulations, you managed the complicated Tag Manager Part.

Reseller Concept

Now for the simple Part. The Calculation in Analytics. What we need in first place is to receive the Custom Metric from the Tag Manager, so that we can calculate the real Revenue. So simply create a new Custom Metric called something like „Provision“ in the Admin Panel of your Shop Property under „Custom Metrics“. The Scope should be „Product“ and the Formatting Type „Integer“. Now make sure that its active and that the Index Number you get (first Custom Metric is one) is the same as the Index Number you give the Metric in your Transaction Tag with.

For the Calculation we just use the so called „Calculated Metrics“. This is a Metric that you can enrich with simple calculations. Head to Analytics and click in the Admin Panel under the View Settings the option „Calculated Metrics“. Create a new one and name it something like „Real Revenue“. The Formatting Type should be „Currency (Decimal)“. In the text field under „Formula“ it is now possible to do a calculation with given Metrics, which will be the outcome for this specific Calculated Metric. So first we take the build in Metric „Revenue“ (Transaction Revenue) and divide it by 100. Take that result and multiply it with our Custom Metric „Provision“, which should be a number between 0 and 100. That's about it. Well done Sir!

Reseller Concept

Before the testing you have to wait for some new Transactions, because this workaround doesn't apply to old Transactions already made. After some time you can create a new Custom Report including the Revenue, the Commission and of course your new Real Revenue Metric. If you made everything correctly, the outcome should look something like this:

Reseller Concept

Now you can easily read out your real revenue, that every single transaction creates for you. I hope you enjoyed this tutorial and that it will help you in your daily business. Keep the Funnel burning!