With custom fields, you can add multiple transformation steps to unlock advanced data manipulation opportunities. By layering functions, lookups, and conditions, you can create complex rules for manipulating your data and conduct in-depth analysis with deeper insights.
Use cases for adding multiple transformation steps include:
- Data enhancement with functions and lookups: Suppose your campaign names include a product category, but you wish to analyze performance by category. You can use a function to extract the category from the campaign name, then a lookup to map category codes to full category names. This enables you to evaluate performance by product category instead of individual campaigns.
- Performance metric calculation and categorization: You can calculate the cost per click (CPC) and categorize it as 'High', 'Medium', or 'Low'. Start with a function to calculate CPC (Ad Spend / Clicks), then add a condition to categorize the CPC based on your thresholds.
- Data clean-up and transformation: If your ad campaigns are missing key information, like the target country, a function can fill the missing country values with 'Not Specified'. Then, add a lookup transformation to convert the country codes to full country names, followed by a condition to flag campaigns targeting high-priority countries.
- Data enrichment for advanced analysis: Maybe you need to transform your ad spend into another currency, round to the nearest dollar, and flag any campaigns with spend over a set threshold. First, use a function to apply the currency conversion, add another function to round the result, and finally a condition to flag high-spending campaigns.
- On the Supermetrics Hub, go to Transformations → Custom fields.
- Click Create 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.
- Select the data source you want to apply a transformation to and click Next.
- Select your first transformation — function, lookup, or condition.
- After you've configured your initial transformation, click Add another transformation. This allows you to apply another transformation to the result of the previous step.
- Select the type of your next transformation and configure it as necessary.
- Click Add another transformation to continue adding transformations until you’ve created the custom field you need.
- When done, click Next.
- Give your custom field a name.
- Click Create custom field.
You can now use your new custom field in your reporting.