TagCommanders Data Storage is a cookie stored on the user’s browser.
When you create data storage in the TagCommander interface, a cookie with the same name is stored on the visitor’s browser. Data storage allows you to make use of the data it contains. Its use is described in the next articles in this section.
Data storage is useful for continually storing data about a visitor from one page to the next, from one visit to the next or for a defined period of time up to one year.
It is a cookie that stores data and allows to use it afterwards in many ways. Its uses are detailed in other articles in this section.
Additional information
Data storage that you create in the interface are first-party cookies, which are cookies set for your site’s domain name.
You can use the function below to see the content of data storage created for one of your site’s pages:
You can use the following function to create custom data storage:
To add data storage, you must go to the “Options” tab > “Data layer” > “Data Storage” and click “ADD DATA STORAGE” (1):
The “add” window consists of the following fields:
Name: Name of the Data Storage
Container(s) to link:A menu that unfolds and shows all available containers
Lifetime: A menu to select the cookie’s lifetime
Type: the type of cookie/what it is used for
Value: the values the cookie will take (a and b for ab testing, many more for n testing …)
Generates a unique ID for each visitor.
Example: TagCommander can become your visitors’ unique reference ID to replace or enrich the ID generated by your partner solutions.
The “Do you want lifetime to be refreshed at each page view?” option (1) changes the data storage’s lifetime based on the frequency of visits to the site. This option refreshes the data storage lifetime with each page view.
Example: you have set the data storage lifetime to 30 days and checked this option. If a user visits the page at 12 p.m. on 05/01/2015, the cookie will remain on the visitor’s computer until 12 p.m. on 05/31/2015, i.e. 30 days later. The cookie’s lifetime will refresh with each page view.
Saves the value of a URL parameter.
Example: if you want to save the value of the “utm_source” parameter, i.e. “google” in the URL https://www.site.com/landing?utm_source=google&utm_medium=cpc, you must enter the name of the parameter to save, which in this case would be “utm_source” (1)
Assigns a score based on the number of page views.
Example: if you want to assign the score of “A” to visitors visiting 1 to 3 pages (1), a “B” to visitors visiting 4 to 7 pages (2) and a “C” to visitors visiting 8 to 11 pages (3), you must enter the different ranges of page views and indicate each range’s score. The data storage value will be the score (A, B or C).
Saves the number of page views for a given visitor.
Example: you can use this data storage type if you want to save and send the user’s number of page views to one of your solutions or define a tag’s activation on the number of page views. Just select the “page views counter” data storage type, and the cookie’s value will increase automatically with each page view (1 page view: cookie value = “1”, 2 page views: cookie value = “2”, etc.)
Creating two visitor populations split 50/50.
Example: if you want to activate solution A for 50% of your visitors and solution B for the remaining 50%, all you need to do is indicate the data storage values for population A, “vendor_A” for example, (1) and population B, “vendor_B” (2).
You will then be able to create a rule during the deployment process in the “Rules” section that activates solution A’s tags when the data storage value is “vendor_A”, and solution B’s tags when the value is “vendor_B”.
Note: this method is used regularly for A/B tests of two competing retargeting solutions.
Creating N visitor populations of equal size.
Example: if you want to launch an N test for 3 competing solutions, each solution will be assigned 33.3% of the traffic (100%/3); for 4 solutions, each solution will be assigned 25% of the traffic (100%/4), and so forth.
If you decide to activate solution A for 33.3% of your visitors, solution B for another 33.3% and solution C for the remaining 33.3%, you must enter the data storage value in each case. For example, “vendor_A” for solution A, “vendor_B” for solution B and “vendor_C” for solution C (1). Each value must be separated by a comma in order to be processed.
Saves a variable’s value.
Example: if at some point you want to save a TagCommander data layer variable or any other JavaScript variable present on the page, you must enter the name of the variable to save.
For example, data storage allows you to save visitors’ user_id variables in order to recognize them if they return several days after leaving your site. To save the user_id variable value, you must enter “tc_vars[“user_id”]” or “tc_vars.user_id” (both formats are accepted) in the “Variable to save” field (1). If you want to save the value of an internal variable, you must enter the value using the following format: tC.internalvars.variable_name.
These variables are called external variables because they are outside the TagCommander container: They are embedded directly in the source code of your site’s pages, in contrast with internal variables, which are created inside the container and therefore not visible in the page’s source code. External variables are added by your technical teams or the technical provider in charge of implementing TagCommander on your site.
External variables are indispensable since they contain most of the data sent to the solutions present in the container. Their function and number vary depending on the site’s economic model (for example, media sites will not have the same external variables as e-commerce sites).
The list of external variables must be considered and established before TagCommander is implemented in order to meet the embedded solutions’ medium- to long-term needs. A summary of the external variables to implement on your site will be provided by your Commanders Act consultant during the setup phase of the TMS, in an Excel file named “deliverables” or “tagging plan“.
External variables must be declared in the TagCommander interface before you begin configuring tags in your containers. See the “Adding external variables” article in this section to find out how to declare an external variable in the interface.
All declared external variables can be used:
– To pass information to the solutions embedded in the container (linking external variables and solutions is called mapping). See the “Mapping Tags’ Variables” article to find out how to map your external variables in a tag.
– To create activation rules for your tags. See the “Adding Rules” section to find out how to create rules based on your external variables.
Additional information
As with your container, external variables must be present on all of your site’s pages and assigned values suited to the context. For example:
– The value of the “page template” variable will be different for the most important page templates on your site: homepage, product page, confirmation page, etc.
– The value of the “user id” variable will change for each visitor that connects to your site.
External variables must be declared in your site’s source code before the call to your containers (=JavaScript files). If you have a header container, the external variables will thus be present in the <head>; if you have a container in the body, they must be declared in the <body> html tag.
Here is a sample list of external variables:
There are two situations in which you may need to declare your variables in the external variable management interface:
1) You wish to install TagCommander on a new site: prior to having your technical teams or technical provider implement the data layer/variables in your site’s source code, you need to declare the variables in the TagCommander interface so they are available for mapping.
2) Information is missing from your current tagging plan (e.g. customer status): Again, this variable must be declared in the interface first, before it can be used in your tags and rules.
Note: If necessary, you can click “Download“, (1) to retrieve your external variables in JavaScript format and send them to your technical team or the technical provider in charge of implementing the variables in you site’s source code:
Clicking “Download” will open a window containing the JavaScript code (1) to insert in the site’s source code:
To add an external variable, you must go to the “TagCommander” interface, “Options” tab > “External Variables” and click “ADD VARIABLE” (1):
The “add variable” window contains various fields:
(1) “Name“: the variable’s name (mandatory field).
(2) “Category“: used to categorize the variable according to its application (e.g. variable relative to users, product pages, confirmation pages, etc.) See the “Categorizing External Variables” article in this section.
(3) “Type“: The type of variable. See the “Managing Variable Types” article in this section.
(4) “Use in noscript“: Check the box so that the variable is present in the tag’s noscript code.
(5) “Description“: A description of the variable, to clarify the variable’s name (e.g. “Page template” can be the description of the variable named “env_template”).
(6) “Detailed description“: A detailed description of the variable, to further clarify the variable’s name (e.g. “possible values: homepage/category/product/funnel_confirmation” can be the detailed description of the “env_template” variable).
Once the variable is added, it will appear on the variables list:
Variables can be categorized for easier management.
Categories allow you to classify variables according to their application (e.g. variables relative to site users in the “Users” category, variables for product pages in the “Product page” category, generic cross-functional variables for the site in the “Environment” category, etc.)
Categories are managed by clicking the “manage categories” button to the left of the green “ADD VARIABLE” button:
Once your category is created, it can be used in the window to add and edit external variables; you can edit them by clicking the pencil icon, delete them by clicking the cross and adding them by entering a name and clicking the green plus button :
The variable “type” (also called “processing function“) allows you to modify the variable format on the fly when mapping your tags.
They are useful when one of your solutions requires a variable format that is different from the format used in the external variables by the technical teams in charge of implementing the data layer.
For example, if your “page_name” variable contains special characters in the source code, the processing functions allow you to correct them so that your solutions can receive the value without special characters.
The most commonly used types are:
Order amount: this allows you to modify the number format (amount) on the fly.
You can change separating commas into periods (e.g. “12,50” becomes “12.50”), choose the number of decimal places to retain (e.g. “12.50 becomes “12.5”), or convert the amount into pennies (“12.50 becomes “1250”).
Alphanumeric & Special chars: this allows you to modify the character string format on the fly.
You can replace special characters with “_” (e.g. “the company&its values” changes to “the company_its values”) or truncate a character string (e.g. limiting the variable’s value to 10 characters).
After assigning a variable type, you can modify its value on the fly, tag by tag, in the “EDIT” interface. Variables with a type added will have a blue symbol in front of their name (1):
Once you have mapped your variable, click the symbol:
A window will appear with a list of different operations corresponding to the type chosen. Check the box corresponding to the operation you want (for example, remove special characters and replace them by “_”) (1) and click “SAVE” (2):
This type can be assigned to variables having a two-dimensional array as a value. On an ecommerce site, this will deal very often with “list_product” and “order_product” variables that return, respectively, information on products displayed on a category page or added to the cart.
We speak of “two-dimensional arrays” since these variables return an array of values for each product (e.g. for all the products on the site’s page, their ID, name, price, quantity, etc.).
Certain partner solutions may request that you send product data in their tag that are separated by a character called a “separator” (e.g. all product IDs separated by “|“, or all product prices separated by a comma in their confirmation tag).
The operation will be much easier if you select the “Two-dimensional array” processing function for your “order_product” variable.
You will then be able to send your partners the information they expect without requiring any knowledge of JavaScript.
The first step in the configuration process is to select the “Two-dimensional array” type (1) for your variable:
Once this type is added, click on the “List” icon (1) that appears next to your variable to see a summary of the external variables:
Enter all your array keys in the window that appears (e.g. if your main variable is “order_product”, the keys will be characteristics of your products, i.e. the ID, name, price, etc.):
After selecting the “Two-dimensional array” type for your variable go to the “EDIT” step. Click the symbol appearing to the left of the variable that you just mapped:
Enter the array key in the configuration window (e.g. the product ID) and the separator:
You can also use the “Two-dimensional array” type to create internal variables that return product keys separated by the symbol of your choice. For more information, go to the “Adding Custom Internal Variables – Builder Mode” article.
You can edit an external variable by clicking the “Edit” icon (1) and delete it by clicking the trash can. The flag next to the variable’s name (2) will tell you if it is mapped and the tag(s) it is mapped with:
Note: The variables used in a container (to be added to a tag, for example) cannot be deleted, and their names cannot be modified.
By clicking on the flag, you will see which container(s), tag(s) or rule(s) use this variable:
The data layer represents all your available data. It consists of information about your site (e.g. page name, product ID) and your visitors (e.g. user ID, customer status) in the form of JavaScript variables.
These variables have two uses:
– To populate the tags present in your container;
– To create activation rules for your tags.
Additional information:
The data layer can consist of two types of data:
– Data implemented by your IT department or your technical provider for all your web pages, based on the CSS, Backoffice and CRM. These data are called “external variables” and are displayed in your site’s source code as a JavaScript object containing all the variables used by your tags.
This is what the external variables look like in the source code:
– Data created in the interface by Commanders Act staff or TagCommander users based on information available on the site’s pages (URL, cookies, HTML tags, external variables in the data layer, etc). They are called “internal variables” and are displayed in the TagCommander container’s code.
Event variables are the variables present in TagCommander events. They are used primarily for tracking user actions (button clicks, links, etc.).
Event variables are useful if you want to send data specific to an event without having these data on your site pages as external variables.
Example: you wish to assign an event for the “Send” button on your form. The event variables could be the user’s last name, first name, email address and telephone number. These are data that are not available when the page is loaded; it only becomes available after the user has completed the fields on the form and clicked “Send”.
Event variables must be added in the TagCommander interface before they can be used, and only for events, not tags.
Event variables must be created in the TagCommander interface before they can be used in an event. See the “Adding event variables” article to find out how to create an event variable in the interface.
All event variables created can be used:
To add information to the solutions embedded in TagCommander (linking event variables and solutions is called mapping). See the “Mapping Tags’ Variables” article to find out how to map your variables in an event.
To create activation rules for your events. See the “Adding Rules” section to find out how to create rules based on your event variables.
Additional information
Event variables must be implemented in the TagCommander event function (tc_events).
Note: External variables that are already available on the page do not need to be implemented in your event. For example, you do not need to assign a “country” variable to an event if this information is already present in an external variable.
Here is an example of an event variable:
There are two situations in which you may need to declare your variables in the event variable management interface:
You want to implement TagCommander events on a new site. The variables that your technical staff or technical provider implement in the site’s source code (in the tc_events function) must be declared in the interface first in order to be available to be added to your tags and rules.
Variables are for your current event functions are missing or you want to add a new event to your site. Again, this variable must be declared in the interface first before it can be used in your tags and rules.
To add an event variable, you must go to the “Options” tab > “Event Variables” and click “ADD VARIABLE” (1):
The “add” window consists of the following elements:
(1) “Name“: the variable’s name (mandatory field)
(2) “Type“: the variable’s type
(3) “Description“: A description of the variable, to clarify its name (e.g. “Page template” can be the description of the variable named “env_template”)
(4) “Detailed description“: A detailed description of the variable, to further clarify tits name (e.g. “possible values: homepage/category/product/funnel_confirmation” can be the detailed description of the “env_template” variable)
You can edit an internal variable by clicking the “Edit” icon (1) and delete it by clicking the “X” (2):
These variables are called internal variables because they are created inside the TagCommanders container: They are integrated directly into your site’s container, in contrast with external variables, which are added into the page’s source code by the technical staff.
Internal variables are used to collect data to enrich data through the external variables. A library of predefined internal variables is available, but you can also create your own.
Internal variables must be created in the TagCommander interface before they can be used in containers. See the rest of the articles in the “internal variables” section to know more about the different options available to create such variables.
All internal variables created can be used:
To be added to the solutions embedded in the container (linking internal variables and solutions is called mapping). See the “Mapping tags’ variables” article to find out how to map your internal variables in a tag.
To create activation rules for your tags. See the “Adding Rules” article to find out how to create rules based on your internal variables.
Additional information
Internal variables are all coded in JavaScript, but you do not need any technical knowledge of JavaScript in order to use the “Predefined” variables or the “Builder” modes, since the code is generated automatically by the TagCommander. However, you will need to know JavaScript or seek help from the Commanders Act support team in order to create your own custom internal variables.
Here are some examples of predefined internal variables:
Internal variable for retrieving the URL of the page:
Internal variable for retrieving the URL of the previous page/site:
Internal variable for retrieving what comes between the first “/” and second “/” of the URL:
There are several situations in which you may need to create an internal variable using the internal variable management interface:
You want to retrieve elements available on your web pages, but they do not have external variables implemented by technical staff (for example: the value of a cookie, HTML tag, URL, etc.).
You want to create a new variable based on the values of external variables already implemented by technical staff (for example: calculating the cart’s total before tax using the external variable that returns the cart’s total including tax).
You want to create a lookup table based on an external variable (for example: when the external “country” variable is “FR”, you send an account number to your analytics tool that is different from when the variable is “IT”).
Etc.
The link created between the internal variables and the solutions is called “mapping“. This is performed in the “EDIT” tab during the container deployment process.
There are two types of internal variables: predefined and custom.
Predefined internal variables, have already been created and are ready to use (e.g. variables that retrieve URL fragments).
You can also configure your own internal variables, using pre-existing variables (e.g. external variables) or retrieving elements available on your sites’ pages (e.g. cookies).
To declare a predefined internal variable, click “Options” > “Internal Variables” > “ADD PREDEFINED VARIABLE” (1):
You will then be prompted to select a predefined variable universe.
The “add variable” window contains various fields:
(1) “Predefined universe“: Selection of predefined internal variable categories
(2) “Name“: Variable’s name
(3) “Description“: Variable’s description
(4) “Code“: Variable’s code
(5) Checkbox: The selection of predefined internal variables to add to the container (it is futile to include variables you do not wish to use).
Four predefined variable universes (“Predefined universe”) are available:
Common variables: The most used variables by both TagCommander consultants and customers.
Customer journey variables: Variables that exploit the visitor’s customer journey (prerequisite: the deduplication module must be activated).
AT Internet plugin: Variables that exploit data collected by the AT Internet digital analytics solution (prerequisite: the AT Internet solution must be present on your site).
Partner tags: Code snippets adapted and adaptable to partner tags to increase their potential and perform additional actions.
You will find below a list of the variables available in the “Common variables” category and their description:
Page title: it stores the title of the page (from the <title> html tag).
Example:
The value of this variable (on the http://www.tagcommander.com/fr/) page will be “Commanders Act – Tag Universel – Tag Management – Commanders Act”. It takes the value of the html <title> tab.
***
Page URL: it stores the URL of the current page.
Example:
The value of this variable for the “http://www.tagcommander.com/fr/” page will be “http://www.tagcommander.com/fr/”
***
Previously Visited URL: it stores the URL of the previous page
Example:
If the visitor arrives at the Commanders Act site via the Google search engine, the value of this variable will contain “google.fr”
***
Page URL without query string: it stores the URL of the current page without the tracking parameters (Commanders Act will remove the “?” from the URL and everything after it.
Example:
If the visitor is on the page “https://www.google.fr/webhp?tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10″, the value of this variable will be “https://www.google.fr/webhp”
***
Page query string only: it stores the the current page’s URL parameters (Commanders Act a will save everything that follows the “?” without including it).
Example:
If the visitor is on the page “https://www.google.fr/webhp?tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10″, the value of this variable will be “tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10”
***
URL parameters: it stores the current page’s array of URL parameters.
Example:
If the visitor is on the page “https://www.google.fr/webhp?tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10″, this variable will contain the value of these three parameters: “tab”, “ei” and “ved”, and their values will be accessible in the following manner: “tc_array_url_vars[‘tab’]”, “tc_array_url_vars[‘ei’]” and “tc_array_url_vars[‘ved’]”
***
Folder #1 in URL: it stores the First “folder” in the current page’s URL
Example:
If the visitor is on the page “http://www.tagcommander.com/fr/fonctionnalites/tag-management”, the value of this variable will be “fr”.
***
Folder #2 in URL: it stores the second “folder” in the current page’s URL
Example:
If the visitor is on the page “http://www.tagcommander.com/fr/fonctionnalites/tag-management”, the value of this page will be “fonctionnalites”
***
Folder #3 in URL: it stores Third “folder” in the current page’s URL
Example:
If the visitor is on the page “http://www.tagcommander.com/fr/fonctionnalites/tag-management“, the value of this variable will be “tag-management”
***
Random value(integer 9 digits): it creates and stores a random number composed of 9 digits
Example:
With each pageview/loading of this variable, the variable will return a random 9-digit number; for example, “255103492”
***
URL pathname without query string /…/…/….html: it stores the current page’s URL without the parameters (including the “/”)
Example:
If the visitor is on the page “https://www.google.fr/webhp?tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10″, the value of this variable will be “/webhp”
***
Https protocol? “yes”/”no”: Sends “yes” if the page uses the “https” protocol and “no” if it does not
Example:
If the visitor is on the page “https://www.google.fr/webhp?tab=ww&ei=-ATjVPTyFaWqywOpqoHYDw&ved=0CAcQ1S4#q=inurl&start=10″, the value of this variable will be “yes”
***
Current domain name (www.domain.com): it stores the current page’s domain name
Example:
If the visitor is on the page “http://www.tagcommander.com/fr/fonctionnalites/tag-management”, the value of this variable will be “www.tagcommander.com”
***
Main domain name without subdomains: it stores the current page’s domain name without the subdomains
Example:
If the visitor is on the page “http://www.tagcommander.com/fr/fonctionnalites/tag-management”, the value of this variable will be “tagcommander.com”
***
Unix timestamp: Current UNIX time (the number of seconds since January 1, 1970 00:00:00)
Example:
The current UNIX time when this document was written was “142166467”
***
Device: This variable provides information regarding a user’s device based on their screen resolution.
You will find below a list of the variables available in the “Customer journey variables” category and their corresponding description:
Last touch name (channel): Channel of the last touchpoint saved (prerequisite: deduplication must be active on your site).
Example:
For customer journey “SEO/Google -> SEM/Bing -> Display/Criteo” the value of this variable will be “Display”.
***
Last touch name (source): Source of the last touchpoint saved (prerequisite: deduplication must be active on your site).
Example :
For customer journey “SEO/Google -> SEM/Bing -> Display/Criteo” the value of this variable will be “Criteo”.
You can create your own internal variable in two ways:
Via the “Builder” tab: The “Builder” mode assists you in creating customized internal variables without any technical knowledge or expertise;
Via the “Custom” tab: “Custom” is a completely customized mode used to write your own JavaScript code. This method requires technical knowledge and expertise (but your TagCommander consultant or support team can create custom variables for you if necessary).
To create your own internal variable, click “Options” > “Internal Variables” > “ADD VARIABLE” (1):
The “add variable” window contains various fields:
(1) “tC.internalvars.“: The variable’s name (caution: it must not contain any accents or special characters, especially “-“).
Note: The variable’s name is always prefixed by “tC.internalvars.” in order to avoid conflict with other variables on your site. For example, to see the content of an internal variable directly on your site or use a variable on another site, do not forget to specify the full name of the variable, which includes the prefix “tC.internalvars.” along with the variable’s name.
(2) “Builder“/”Custom“: Select “Builder” or “Custom” creation mode
(3) Area to create the variable (see details below for the Builder and Custom modes)
(4) “Type“: The type of variable. Please refer to the article “Managing Variable Types“.
(5) “Description“: A description of the variable, to clarify the variable’s name (e.g. “Product IDs separated by a /” can be the description of the variable named “tC.internalvars.concatid”)
(6) “Detailed description“: A detailed description of the variable, to further clarify its name (e.g. “ID1/ID1/ID2…” can be the description of the variable named “tC.internalvars.concatid”)
The “Builder” mode offers you three types of operations (1) that we describe below:
“Join internal and/or external variable(s)”;
“Join two-dimensional array variable(s)”;
“Variable mapping”.
This operation allows you to join internal or external variables with the separator of your choice.
Example:
If you wish to join an external variable returning the order ID with another external variable returning the order amount, with everything separated by a “-“, select the “order_id” variable in the “External variables” tab to the left (1) and then enter and add your separator in the “add separator” field (2) in order to finish the “order_amount” variable in the “External variables” tab (1).
This operation allows you to join the array keys of a “Two dimensional array” variable.
Example:
Your retargeting provider wants you to send all the prices of the products added to the cart separated by “|”. Begin by selecting the variable that contains the product information on the cart page (here the “order_products” variable) (1), then the “price” variable (here the “order_product_price” key) (2) and the separator “|” (3). For example, the value obtained might be: “22.50|33.98|94.30”.
This operation allows you to create a lookup table for an input value (via an already existing internal or external variable) and an expected output value.
Example:
You want to send a different account ID to your Digital Analytics solution depending on the work environment (pre-prod or prod). Select your reference variable (here the external variable “env_work”), add its different input values in the “INPUT” field (e.g. “pre-prod” et “prod”) (1) and then add the output account IDs of your analytics solution in the “OUTPUT” field (2). You can also add a default value if none of the values entered in the “INPUT” field have been found (3).
This operation allows you to automatically send the correct account ID to your analytics solution depending on the work environment.
The “Custom” mode allows you to write your own JavaScript code to create the internal variable of your choice:
Note: make sure that the variable’s JavaScript code always has the following syntax:
Also, make sure that %nameVariable% has the same name as the variable entered in the “tC.internalvars” field (see first screenshot with the variable tC.internalvars.mycustomvar):
Note: To avoid potential errors when the internal variable’s code is included, the “TEST” step of the container deployment process will test your internal variable on multiple browsers/operating systems.
The variable “type” (also called “processing function“) allows you to modify the variable format on the fly when mapping your tags.
They are useful when one of your solutions requests a variable format different from the format that you return in your internal variable. For example, if your “order_discount” variable contains three decimal places, the processing functions will allow you to correct this so that your solutions receive the value with only 2 decimal places.
The most commonly used types are:
Order amount: this allows you to modify the number format (amount) on the fly.
You can change separating commas into periods (e.g. “12,50” becomes “12.50”), choose the number of decimal places to retain (e.g. “12.50 becomes “12.5”), or convert the amount into pennies (“12.50 becomes “1250”).
Alphanumeric & Special chars: this allows you to modify the character string format on the fly.
You can replace special characters with “_” (e.g. “the company&its values” changes to “the company_its values”) or truncate a character string (e.g. limiting the variable’s value to 10 characters)
After assigning a variable type, you can modify its value on the fly, tag by tag, in the “EDIT” interface. Variables with a type added will have a blue symbol in front of their name (1):
Once you have mapped your variable, click the symbol:
A window will appear with a list of different operations corresponding to the type chosen. Check the operation you want (for example, use only 2 decimal places in the amount) (1) and click “SAVE” (2))
Since you can create a variable using other variables, it is important for you to be able to manage the order in which they are executed so as to avoid any problems.
Therefore, you must declare an internal variable A, on which an internal variable B is based, before variable B. Variable B needs variable A declared first in order to be executed without creating errors.
The variables’ order can be modified using the double-arrow icon (1):
To categorize an internal variable you must :
Click the edit button (pencil icon to the right in the same row where the internal variable is located) and select the type from the drop down menu as depicted below. This applies only when you add a predefined variable.
Select the type when you add a custom variable, whether with the “Builder” or ‘Full Custom” mode. (Similar window as the one above).
You can link an internal variable to a container if you have multiple containers on your site.
By doing this action, you declare just once the internal variable code in the linked container(s).
Consequences:
You reduce the weight of the other containers by avoiding to declare many times the code of one single internal variable.
If you call 2 containers on the same page, you avoid to overwrite the variable value defined in the first container by the value defined in the second container (if the value can change during the page load)
Example: two containers are on the same page, one in the header and one in the body. If you link an internal variable to the header container you will reduce the code of the page as the variable won’t be declared twice, and keep the value of the variable defined in the header.
To link an internal variable to a container, select the container of your choice when you create or modify your variable in the “Declared in container” field (1):
To realize a bulk action on multiple variables, check the variables of your choice (1), then choose the container(s) in the list (2):