Cet article est disponible uniquement en anglais. Si vous avez besoin d'aide en français, n’hésitez pas à nous contacter.
spyne automatically creates generic dimensions such as the Channel name, Campaign name, Account name, and ID, etc. In addition, you can create customized dimensions using the Dimension Mapping section. You can create rules to extract values from your naming convention (taxonomy) into dimensions such as Country, Brand, Strategy, etc.
What is a dimension?
A dimension is a category you can use throughout all spyne tools and reports for charts, filters, goals and spyneAI.
Dimensions can be created at multiple levels: campaign, adgroup (adset, line item) and ads (placement).
You can create up to 20 dimensions at the campaign level, 20 at the Adset level, and 20 at the Ad level.
How to access Dimension Mapping?
Click your avatar at the bottom of the page, then select Workspace Settings
From the navigation bar, select Dimension Mapping in the Workspace section.
How to create a dimension?
1. Click Create dimensions at the top right of the page
2. Configure the dimension details
Scope refers to the level of the naming convention (taxonomy) from which you want to extract the values.
Name the dimension, e.g. Country, Brand, Strategy, Product.
Add a description to provide essential context for other users.
How to set up rules?
Once the dimension details have been filled, you can add rules.
Click the button +Add rules to define how spyne should extract the values from the naming convention (taxonomy).
1. Specify the channel or channels (Meta, Google, Tiktok, etc.) to which the rule should be applied. You can create different rules for each channel or use the same across multiple channels.
You can also select "Source is not". Instead of selecting the sources the rule applies to, you select the sources to exclude.
Example: Source is not Google Display, Criteo → The rule applies to all other sources except these two.
Using “source is” is hard to manage with many ad networks. “source is not” is easier because we only exclude a few sources instead of listing all included ones.
2. Click the button Add step
A rule consists of two main parts, then “when” part (optional), which specifies which condition the rules applies to, and
When
This part is optional, it specifies which level name and conditions the rules apply to.
Define in which name should the system look for information: Channel, Channel Group, Account Name, Account Id, Campaign Name, Campaign Id, Adset id, Adset name, Ad name, Ad id.
Then, set up the conditions.
Split
Split a name by a specific delimiter (e.g. “_” or “|” or “-”) to extract a sub text and match it to the dimension. To do this, use ‘split by’ to provide a delimiter.
For example,
The campaign name is UK_SpringCampaign_RTG_Wave1. You want to extract the 1st segment, which is “UK”.
Split aggregate
This is an extended version of "split" or "split value".
It splits a text field (e.g., a campaign name) using a separator, but instead of returning a single value at a specific position, it returns multiple values over a defined range.
Example with the string "Fil_ROUGE_FR_2025":
split with separator
"_"and position4→ returns "2025"split aggregate with separator
"_"and range1 to 3→ returns "Fil_ROUGE_FR"
Split length
It refers to setting criteria on the number of segments resulting from a split operation. You can check if a campaign or ad name, when split by a specific delimiter (e.g. “_” or “|” or “-”), contains the proper number of segments according to your taxonomy standards.
For exemple,
If your campaign names are structured as follows: country_strategy_brand_product, and you want to extract the 'country' value, which is the first segment separated by the delimiter ''. However, some campaigns might have '_' within the country name, e.g., United_Kingdom. This could result in errors when splitting with the '_' delimiter. You want the rules to only apply to these campaigns that don't have 4 segments after splitting.
Field value
Rules are applied to the field values. Several ways to identify the values that you want the system to extract.
Contain
It checks if a part of the text is found within the value.
Does not contain
It checks if the text is not found within the value.
Is in
It checks if the value matches any of the listed options.
Is not in
It checks if the value does not match any of the listed options.
Equals
It checks if the value is exactly the same as what is specified.
Matches regex
For example if you want to find all campaign_names that match the regex
“….[Market:…]….”
\[Market:[^\]]+\]
As it is not made to extract anything, but to match, the regex should not contain any capture group. For more information about capture groups, check the part Regex explained: Capture groups.
You can use advanced text extraction and value setting with a full regex integration, for more information about regex please visit : source.
For example,
There are 'Wave1', 'Wave2', 'Wave3', and 'Wave4' in the campaign names. UK_SpringCampaign_RTG_Wave1, FR_SpringCampaign_RTG_Wave2, UK_SummerCampaign_RTG_Wave3, FR_WinterCampaign_RTG_Wave4.You want the rule to only be applied to campaigns whose name contains 'Wave'.This method is ideal when a dimension is restricted to a predefined set of values.
Text operations (modifiers)
Not case sensitive
The system ignores the distinction between uppercase and lowercase letters.
For example,
"Hello" would be considered the same as "hello"
No accents
This option removes accents or diacritical marks from characters in the text.
For example,
"é" would be converted to "e"
Trim
Trimming removes any leading or trailing whitespace characters (such as spaces or tabs) from the text. This ensures that the text doesn't have any unnecessary whitespace at the beginning or end.
For example,
“ e “ would be converted to “e”
None of them
This option indicates that none of the aforementioned text operations will be applied. The text will remain unchanged regarding case sensitivity, accents, and leading/trailing whitespace.
For example,
“ Thé “ would be converted to “ Thé “
Multiple conditions
You can combine multiple conditions with the “+ Add condition” button. Conditions can be combined as AND (both conditions must be true), OR (one of the condition must be true).
For exemple,
For all campaigns whose name contain "Marque", and have "BE", "BE-LU", "LU" in the first segment.
No condition
If you want the “then” without any condition, you can remove the “when” by clicking on the grey cross on the right.
Then
This part is mandatory, it specifies what the action / result of the rule should be.
Text value
Directly input a specific text value
For exemple,
All values that satisfy the 'when' condition will have same value “United Kingdom” everywhere.
Field value
Retrieve the value from a designated field
For exemple,
You want the desired result values to be the same values of campaign names.
Split value
Divide or break down the name into segments, according to a specific delimiter you may have implemented in your taxonomy (e.g. “_” or “|” or “-”), allowing you to choose which segment to collect the values from.
For exemple,
Campaigns are UK_SpringCampaign_RTG_Wave, UK_SpringCampaign_ACQ_Wave.Do a split to extract values from the 3rd segment.You will get "RTG" and "ACQ".
Difference between Split value and Split length: The 'Split length' is used to verify that you have the correct number of segments and raise an error if not (to trigger an alert and prevent extraction errors). 'Split Value' is used for extraction. They can be used successively (if the correct number of segments isn't found, an error is raised; otherwise, the segment is extracted).
Split aggregate
This is an extended version of "split" or "split value".
It splits a text field (e.g., a campaign name) using a separator, but instead of returning a single value at a specific position, it returns multiple values over a defined range.
Example with the string "Fil_ROUGE_FR_2025":
split with separator
"_"and position4→ returns "2025"split aggregate with separator
"_"and range1 to 3→ returns "Fil_ROUGE_FR"
Regex extract
Use regular expressions to extract a value based on a pattern.
For example if the name in [Market:France][Strategy:Retargeting][Type:Display] you can extract the market with the following regular expression :
\[Market:([^\]]+)\]
The regex must contain a UNIQUE Capture Group (parenthesis in this example) and this capture group will be extracted. For more information about capture groups, check the part Regex explained: Capture groups.
For more information about regex please visit : source.
Multiple actions
You can add other subsequent actions, by adding new actions with the button “+ Action” . The options are below:
Lowercase
Convert the value to lowercase
For exemple,
"HELLO" would be converted to "hello"
Uppercase
Convert the value to uppercase
For exemple,
"hello" would be converted to "HELLO"
Title:
Capitalize the first letter of each word
For exemple,
"this is a test" would be converted to "This Is A Test"
Capitalize
Capitalize the first letter of the value
For exemple,
"hello" would be converted to "HELLO"
Replace
You can do one or multiple replacements
For exemple,
"FR" would be converted to "France"
Trim
Remove leading and trailing whitespace
For exemple,
" hello" would be converted to "hello"
Regex replace
Replace parts of the value using regular expressions
For exemple,
"apple pie" would be converted to "banana pie" with refex pattern "apple" and replacement: "banana"
Fallback
Be cautious when using the default action in a rule, as it may result in overlooking mapping errors. Ideally, no values should be returned here as they are considered mapping errors.
Default action within a rule
It serves as a fallback. It defines the actions/results to be executed if no previous steps match. We've set the default value to 'Other,' but you can customize it to suit your needs.
Global default action
The global default action is at the bottom of the page, and serves as a full fallback. It defines the actions/results to be executed if no previous rules match. By default, the value is 'Other,' but you can customize it to suit your needs.
Step-by-step examples of extracting values from the naming convention (taxonomy)
Example 1
For all campaigns that have “UK” in the first segment, for exemple: UK_SpringCampaign_RTG_Wave1. You want to extract this value, and display it in a more friendly way as “United Kingdom”.
Create a dimension called “Country”
When
Select 'split' and define the character used as the separator ('_').
Apply that the system should use the first segment for this dimension, which is numbered “1”
The first segment is equal to “UK”.
Then
Transform into text value that you’d like. You can use the dimension value as it exists in the name “UK”. Alternatively, you may want to display a more user-friendly name for users. In this case, you can instruct the system to display 'United Kingdom' every time it encounters 'UK' by setting up rules.
This approach is suitable when you have a highly structured taxonomy with a fixed number of parameters separated by identified characters. This is often the case when the dimension can take many values. And you can add all other values for each country / values for the 1st segment.
Example 2
If your campaign names are structured as follows: country_strategy_brand_product, and for this custom dimension you want to extract the “Country” value. However some campaigns might be improperly formatted, for example "Country" might appear as "United_Kingdom", with a "_" used within country name, instead of " ". This would generate errors when splitting with the "_" delimitter: "Country" dimension would appear as "United", and "Strategy" dimension, based on the second fragment, as "Kingdom".
Create a dimension called “Strategy” and tag the campaign as “Error” if the number of segments does not meet the requirements.
This is helpful to detect improperly formatted names, and either tag campaigns or ads with an “Undefined” or “Error” value, or modify their names on the media platform.
Example 3
Your campaign names are structured as follow: country_strategy_brand_product, and for this custom dimension you want to extract the “Strategy” value. You can split the name with the "_" delimitter and select the second segment.
Create a dimension called “Strategy” and split the name to select the second segment.
Example 4
For all campaigns whose name contain "Marque", and have "BE", "BE-LU", "LU" in the first segment, you want to extract this value, and display it as "Belgium".
Example 5
You can create rules without the "When" section. Split the campaign names and extract all values of the second segment. The seperator is '_'.
How to test rules and check the results?
Once you have created one or more rule, you can check how it will apply to your existing campaigns (all campaigns over the last 30 days are checked against the rules).
Click the button Test at the top right of the page. The test results will appear above the rules section.
It will show you what values are applied, and you can inspect if all campaign / ads set / ad are properly mapped or if there is any undefined error.
Click on the dimension value line to view the details, including channel, associated campaign/adset/ad, spend, and impressions and redirect link to the media platform.
Tips:
Reorder rules and steps
Switch on the toggle “Reorder rules and steps”
Now you can reorder by moving up and down.
The rule priority is what determines which rule to apply first when multiple rules could apply. You specify priority by moving individual rules up or down in the list of rules. Rules at the top of the list take priority over rules further down the list.
Always review the order in which rules or filters are applied. This is especially important when there’s an “all” condition, as it may affect how other rules are evaluated and in which sequence they take effect.
Take notes
Add notes to provide context and share them with other users or reference for later.
Trim duplicates in names
If it looks like a name appears twice (for example, with extra spaces or slightly different formatting), trim it to avoid duplication issues. This ensures cleaner data and prevents confusion when analyzing results.
How to update dimension in case of changes?
Click on "Update dimension" if you have made changes. Or, click on "Discard changes" if you do not want to save the changes.
Regex explained: Capture groups
Regex Without Capture Groups
When you use a regex without capture groups, it simply checks for the presence of a pattern in the text. It can tell you if the pattern exists, but it does not save or return the parts of the text that match that pattern. This is useful for the Matches Regex filter.
Example: Let's say you have the regex pattern dog.
Regex:
dogInput Text: "I have a dog and a cat."
What It Does: It finds the word "dog" in the text.
Output: It just tells you that "dog" exists in the text but doesn’t give you any parts of it.
Regex With Capture Groups
When you use a regex with capture groups, it not only checks for a pattern but also captures (saves) specific parts of the text that match the pattern. This is done using parentheses (), which define the parts you want to keep. This is useful for the Regex Extract action.
Example: Consider the regex pattern (dog).
Regex:
(dog)Input Text: "dog is my pet."
What It Does: It identifies the word "dog" in the text and captures it.
Output: It returns the captured word "dog" for further use.
Copy dimensions from one workspace to one or more other workspaces
Click Copy dimensions on the top of the page
Select the dimension(s) you want to copy, and the destination workspace(s)





























