Metering Elements

Metering Elements are key value pairs that allow you to track and/or monetize specific elements (such as the content of query parameters) in addition to transaction call counts.

Metering Elements Overview

Monetization Use Case

Metering Elements are commonly used in monetization when a transactional pricing model is not detailed enough for the service you are selling. A common scenario for element usage is when certain activities cost you far more to deliver than others, and where you wish to scale costs for users based on different types of usage.

For example, imagine that you operate a shipping tracking service, and you want to charge a subscription fee based on how many regions that an end subscriber accessed in a subscription period. In this example, you don't want to charge transactionally, but instead you will charge a flat fee per region accessed. You can accomplish this type of pricing model using Metering Elements.

Steps to Enable Element-Based Pricing Models:

  1. Create the metering element key value pair using the instructions on this page.

  2. Configure the relevant source with the possible metering elements for Revenium to monitor on the Source configuration page. This allows the transaction engine to capture metering element information involving transactions from the targeted sources.

  3. Add element-based pricing to your Product configuration (note, the sources configured in step 2 must be included in the Product). This will tell the Revenium metering engine how to charge the end subscriber when the metering elements are received.

Create & Manage Metering Elements

Click the 'plus' sign or 'edit' icon to create or manage existing elements respectively. A modal will open allowing you to create or edit an existing Metering Element. (Figure 2)

AttributeUsage

Element Description

A human readable value that will help you to identify the purpose of the element when viewed in reports, on invoices, etc.

Element Key Name

The key in the JSON key-value pair that makes up the element. Revenium will look for this key & value in the data you send and rate it according to the pricing rules you define in the Product.

Element Type

Defining your element as a string or number enables different Product billing models like 'max' or 'average' value calculations. If your use case will contain a mix of numbers and strings, define the value as a string.

Analytics Use Case

If you simply wish to capture the usage of different query parameters in your API calls, the configuration is exactly the same as the monetization use case, with the exception of Step 3. There is no need to define a pricing model for metering element usage if you are not charging subscribers based on the elements sent to Revenium.

Sending Element Usage Data to Revenium

Once you have followed the steps above to enable elements in your account, you can send test element data to the Revenium platform using a curl call like the one below.

Note that many of our Data Connectors have built in capabilities to convert query parameters and their values into element data as well.

// Sending element data to Revenium

curl --verbose --request POST \
     --url 'https://api.revenium.io/meter/v1/api/meter' \
     --header 'content-type: application/json' \
     --header 'x-api-key: ENTER_APIKEY_HERE' \
     --data '
{
  "url": "https://test-asset-url.com/test/",
  "application": "any_application_id",
  "contentType": "application/json",
  "httpProtocol": "HTTP/1.0",
  "method": "POST",
  "responseCode": 200,
  "elements": [{"name": "yourElementName",
                "value": "yourElementValue"}]
}

Last updated

© Revenium - www.revenium.io