Functions allow you to transform one field or column with a custom rule. With plenty of functions available, custom fields equips you with the tools needed to transform your data into meaningful, actionable insights.
Some popular use cases include:
- Evaluating campaign effectiveness: Select 'Divide' as your function. Define 'Clicks' as your dividend and 'Impressions' as your divisor to calculate the CTR of your ad campaign. Multiply the result by 100 to get a percentage.
- Converting currencies: Select 'Currency Conversion'. Then, specify the currency you're converting from, the currency you're converting to, and the field containing the amounts to convert (typically your ad spend data). Make sure to select a date for the exchange rate. You can also map the exchange rate to the date field to get historical currency conversion rates for each conversion.
- Normalizing text data: To standardize text data, select either 'Lower case', 'Upper case', or 'Uppercase first letter', depending on your needs. Specify the text field to apply the function to.
These are just a few examples of what's possible with functions in custom fields. See this article for a full list of available functions. Note that if you're using regex in your custom fields, the indexing defaults to 0 instead of 1.
Keep in mind that these functions can be combined with other transformation steps for more complex transformations.
Instructions
- On the Supermetrics Hub, go to Transform → Custom fields.
- Click New custom field.
- Select either dimension or metric and click Next.
This selection is based on the aspect of the data you aim to manipulate. For instance, if you're looking to calculate Click-Through Rate (CTR), you'd be working with metrics ('Clicks' and 'Impressions'). - Select the data source you want to apply a transformation to and click Next.
- Select Function as your transformation type.
This selection enables you to manipulate your selected data using a variety of mathematical or textual operations. - From the list of available functions, select the one that best suits your needs.
Each function exposes specific fields that you'll need to configure according to your use case. For example, if you selected 'Divide', you'll need to specify the 'Dividend' (the number to be divided) and 'Divisor' (the number to divide by) fields.
- After configuring your function, click Next.
- Give a name for your custom field.
- Click Create custom field.
You can now use your new custom field in your reporting.