Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
A tag is a piece of code executed on your site that allows information regarding the site or its visitors to be sent to a digital marketing solution.
Example: Digital analytics tags collect information on site page views, visitors, and conversions in order to propose analysis of your site’s performance. Retargeting tags collect information on products viewed or added to the cart by visitors in order to retarget them to other sites via banners that highlight the products they browsed.
Additional information
Here is an example of a tag (basic 'custom event' Commanders Act OneTag):
The first step of the deployment process “SELECT” displays the tags present in your container and allows you to add new ones.
The main area of the “SELECT” interface displays all the tags already present in your container. Each block represents one tag: You can edit or delete your tag by clicking on the respective icons in the block.
You can search for a previously added tag by solution name using the “All vendors” filter in the drop-down menu or by searching for the tag name via the search box:
Click the blue “ADD TAG(S)” button to add a new tag to your tag list:
The Commanders Act tag library window will appear displaying the pre-configured tags in the interface. The tag library is composed of the following elements:
“Search a tag“: Search box for finding a tag in the library by its name
“All vendors“: Filter for finding tags by solution name
Search by letter: Tags in the library are sorted in alphabetical order (by tag name)
Tag library: All the tags in the library (click the tag(s) you want to add to your container)
“Add tag(s)“: Click this button to add the selected tag(s) to the container
To add one or more tags to your container, check the desired tags and click the green “ADD TAG(S)” button. Your new tags will appear in the list of tags present in the container.
Go to the “EDITION” section. Follow the same steps then from the "SELECT" page
The blue ADD TAGS buttons will open the Commanders Act tag library.
Once a tag is added, you can configure it in the “EDIT” step.
A list of your tags is displayed in the left menu of the “EDIT” interface. Tags that need to be configured or validated have a warning (/!\) sign before their name.
For each tag selected, a configuration window will appear in the center of the interface containing the following elements:
Expiration: An expiration date can be applied to the tag
Tag variable(s): Tag variables that need data layer data or static information linked to them
Tag code: The selected tag’s code
Use Tag Cleaner: JavaScript correction tool and preview button to see the tag’s code once its variables have been mapped with variables from the datalayer
Previous version(s): The tag’s version history;
“delete” and “save” buttons
Rules: Shortcut to the tag’s rules configuration
You can apply a custom expiration date to each tag. Check the box to activate this function and then select a date on the calendar or type it in the blank field.
When you activate the expiration function, it automatically deactivates the tag into the container on the expiration date selected.
This function is useful if you have added a tag for a specific campaign and you want it to be deactivated once it ends, so that your container is not needlessly overloaded with tags.
Important reminder: You must create a link between the information requested by the different tags in the container and the data available in the data layer. Adding data layer variables to tag variables is called “mapping“.
The tag variables to map are called “dynamic variables“, and they are designated in the following manner: #variable#.
They appear in the tag’s code, in blue boldface, as well as above the tag’s code .
Additional information
If the tag’s code does not meet your needs, you can customize it directly in the “JAVASCRIPT CODE” section as well as the “NOSCRIPT CODE” section for browsers without JavaScript activated (this function will only work if you call the NOSCRIPT version of the container in your site’s source code):
You can modify your tag directly by transforming the dynamic variables within the code into data of your choice.
Example:
You can also customize your tag’s code by changing the static elements into dynamic variables.
Example:
Note: you can modify your tag anytime you want. However, please pay attention to its JavaScript structure: Dynamic elements must be placed between the ## and followed or preceded by a “+” if they are joined with static elements. The colored syntax in the tag code allows you to verify that there are no errors:
A “Free input (custom)” tag can be used to add a tag to your container even if it is not listed in the tag library.
To configure your custom tag, just replace the default code in the “JAVASCRIPT CODE” with the code supplied by your partner solution and click “SAVE”.
In the vast majority of cases, you will see that your tag is rewritten so that its structure is compatible with that of the container and is called asynchronously. This is also done to prevent errors linked to certain JavaScript data structures such as “document.write”.
Tags are corrected by using the “Use Tag Cleaner” feature:
Uncheck the “Use Tag Cleaner” box if you do not want your tag to be rewritten.
Each time a container is generated, Commanders Act saves the tags present in the container, thus allowing you to return to an old tag configuration if necessary.
Tag version: number of the last tag version saved, name of the user who generated the version, and the date and time it was generated
“Rollback“: button allowing you to return to the tag version displayed
Tag code: selected tag code (JavaScript or NoScript code depending on the option selected in (3))
Tag versions: previous versions of the tag
To return to a previous tag version, select the version you want and click “ROLLBACK“.
You can add a tag activation rule directly in the “EDIT” step.
You have two options:
The rule creation window will appear so that you can create your rules in the same way as in the “RULES” step.
To display a summary of all the tags present on your site along with their rules, go to the “REPORTS” tab > “Tags’ Summary“ *this page is currently accessible only from Platform v7.
You can display the code, rules and expiration date for each tag.
You can also filter the containers or tags that you want to analyze.
This report can be useful for displaying which tags are present on your site at a given time and for sharing this information with others internally. It can also help you find a tag from the list of tags present on your site.
Once you have finished configuring your tag, click “SAVE” to save your modifications.
You can also delete a tag you do not need any more by clicking “DELETE”.
Caution: a deleted tag cannot be recovered.
All checked tags are active and all unchecked tags are inactive. The advantage of deactivating a tag rather than permanently deleting it is that you can keep all the tag parameters (mapping, rules) and reactivate them at a later date without having to reconfigure everything.
Note: Since a deactivated tag will be visible in the interface but not in the container called for your site, your container will not become needlessly cluttered.
To modify the order in which tags are executed in a container in the “GENERATE” step, just drag and drop each tag in the “RANK” column and place them in the order in which you want them to execute on your site’s pages, and then generate a new container version (blue button in the upper-right hand side of the screen):
We recommend that you place the most important tags at the top of the container so that they have the best chance of executing if your visitors change pages quickly without waiting for them to fully load.
To improve your site’s performance, Commanders Act suggests that you deactivate a tag if it takes too long to load. You can enter a maximum duration, in milliseconds, for a tag to execute. If the tag takes longer than this time to execute, it will be deactivated.
You can customize the tag library by restricting the number of tag templates available in the tag addition popin from the “Select” and “Edit” steps.
This “tags whitelist” feature is useful if you wish to limit access to the solutions in the library and only make some of them available to your staff. This aims at preventing users from placing tags you did not authorize into your containers.
The “Library management” interface is accessible to administrators and to custom users this interface was granted access to. The tags whitelist is managed from the “Admin” > “Library management” interface. This page is currently only available on platform v7.
All tags will be selected by default.
You can click the “Unselect all” option and then choose the tags you wish to make available in your library.
Select the site you wish to set up the tags white list for from the drop down menu.
You can Check/Uncheck relevant tags.
The “Select all” and “Unselect all” buttons allow you to check or uncheck many tags simultaneously.
You have the possibility to filter tags by name or alphabetical order.
Click the “SAVE” button to save your settings.
Must know:
When a new tag is added to the tag library by Commanders Act’s staff, it is automatically unchecked if you have already created at least one tag whitelist for your site.
You can copy a tags whitelist from one site to another from the “Administration” > “Copy management” menu.
Note: You can find a tag on the list by using the search box :
You must map these dynamic variables with the data layer variables available in the drop down menus (example: user email, user ID) or a static value (example: method) :
If you wish to hard code the USER ID, just replace #user_id# with the value of the ID:
If you want to make all the values to be collected in a tag dynamically, simply leave them in between hashtags signs. Then save the tag after making this change and you will be able to map your variable with your data layer data:
You can display previous versions of a particular tag by clicking “PREVIOUS VERSION(S)”:
The “PREVIOUS VERSION(S)” window contains all the saved versions of your tag. The version displayed by default is the previous version of the tag.
You can select a previously created perimeter or constraint by clicking the drop-down menu:
You can create a new perimeter or constraint by clicking “+”
For more information on creating rules, please refer to the section.
To activate or deactivate tags in the “GENERATE” step, just check or uncheck each tag in the “ACTIVATION” column and generate a new container version (blue button in the upper right-hand side of the screen):
To add a timeout to tags in the “GENERATE” step, just enter a duration in milliseconds in the “TIMEOUT MS” column and generate a new container version:
The “RULES” step allows you to create your tag activation rules.
You can manage how your tags and events are called by using the tabs displayed in the left menu:
The “Summary” tab provides you with an overview of the created rules per tag and event.
The “Triggers” tab allow you to create triggers for your tags. Triggers are rules allowing to execute tags on different conditions: container loaded, DOM Ready, clicks, form submissions, scroll and custom events.
The “Perimeters” tab allows you to create perimeters for your tags. Perimeters are the page types for which you want to activate your tags (for example: the homepage, “my account” page, product page, etc.).
The “Constraints” tab allows you to create constraints for your tags and events. Constraints are rules based on criteria other than the page type (for example: rules based on visitor status, the type of browser or device, etc.) Note: You must use constraints if you want to create a rule for an event.
The “Deduplication” tab allows you to implement deduplication rules for your tags.
The "Privacy Banners Constraints" tab allows you to setup rules for display your privacy banners
You can use the “Summary” interface to assign previously created rules directly to the new tags you want to add to the container:
By default, a newly added tag is called on the container loaded trigger, on all pages, with no constraints.
You can use this interface to add perimeters and constraints alerady created to tags or events added afterwards or modify them from the “Summary” interface:
To add a perimeter to a tag, you must check the box where the tag line and the perimeter column intersect. You can also delete a tag’s perimeter(s) by checking the green “All pages” column. The tag will now activate on all pages.
To add a constraint to a tag, click edit button (pencil icon) close to the triggers and use the existing constraints list to select those you wish to add to your tag.
Additional information:
You can add multiple triggers, perimeters and constraints to the same tag:
The “OR” logic operates when multiple triggers are added to a tag. For example, if you check the “Container loaded” and “add to cart button” triggers, your tag will activate in one case OR the other, i.e. on the container loaded and at the click on the button.
The “OR” logic operates when multiple perimeters are added to a tag. For example, if you check the “homepage” and “account creation page” perimeters, your tag will activate in one case OR the other, i.e. for the homepage and the account creation page.
The “AND” logic operates when multiple constraints are added to a tag. For example, if you check the “logged user” and “mobile exclusion” constraints, your tag will activate only if the two conditions are met, i.e. only for logged users AND everything except a mobile device.
The “AND” logic operates when a trigger, a perimeter and a constraint are added to the same tag. For example, if you check the “container loaded” trigger, the “homepage” perimeter and the “logged user” constraint, your tag will activate only if the three rules are valid, i.e. only at the container loaded AND on the homepage AND logged visitors.
You can add 3 types of rules: constraint, perimeters and triggers.
Perimeters are the page types you want to activate your tags for (example: the homepage, “my account” page, product page, etc.).
Constraints are rules based on criteria other than the page type (example: rules based on visitor status, the type of browser or device, etc.).
Triggers are rules allowing to execute tags on different conditions: container loaded, DOM Ready, clicks, form submissions, scroll and custom events.
To create a new trigger, click “Trigger” > “ADD TRIGGER”:
To create a new perimeter, click “Perimeters” > “ADD PERIMETER”:
To create a new constraint, click “Constraints”> “ADD TAG CONSTRAINT”:
By clicking “Add trigger” a rule creation interface will appear. This interface allows you to create a trigger of your choice: container loaded, DOM ready, click, form submission, scroll and custom.
By clicking “Add perimeter” or “Add tag constraint“, a rule creation interface will appear. This interface can be seen as a “tool box” that allows you to create rules based on various elements: cookies, data layer variables, URLs, etc.
The “tools” available to you can be selected at the top of the rules creation interface, and various options allow you to create the most appropriate rule for your tag. For each new rule created, make sure to complete the “Name” field (rule name), check the boxes of the tags to which the rule applies and configure the rule.
Note: The perimeter and constraint creation interfaces offer the same options, but in the constraint creation interface you need to link the constraint to a specific trigger:
To modify a rule, click the “edit” icon (pencil icon).
Note: you can modify the rule’s name and value. However, you must create a new rule if you wish to change its type: if you want to replace the “If Variable Equals” rule with “If Variable Is not Equal”.
To delete a rule, click the “trash” icon (garbage bin icon):
Note: your rule will be saved in the trash, where you can recover or permanently delete it at any time:
You can select a default trigger in the container options.
This means that each time you will add a tag to your container, the default trigger(s) will apply on this tag.
To select your default trigger(s), go in the container options, “advanced” part:
This trigger allows calling tags when the container is loaded on a page. It is the default trigger for all the tags you add to your container. This means that the tag will only be called when your JavaScript container loads on your site, but it will not be the case for other event types (such as a click, a page change within an “single page applications” environment, etc.). In order to trigger tags when a container loads on your page, all you need to do is selecting them from the list.
This trigger allows calling tags when the page’s structure is built (on the “DOM Ready” event). To launch tags on this event, all you need to do is selecting them. They will be called on the DOM Ready event when the page loads.
This trigger allows calling tags whenever elements of the page are clicked. Example: if you would like to call a tag when a user clicks a button (ex: “add to cart” button), select the desired tag(s) and enter the code allowing to target the button or the link on your page in the “CSS Selector” field.
Must know:
To retrieve the CSS selector, open your browser’s console and use its targeting tool to target one of your page’s elements. Then right-click, the code appearing in your console, click “Copy” and “Copy selector”. All you have to do next is pasting this code in the interface.
You can enter many selectors in the interface; you will have to separate them with commas.
This trigger allows calling tags when a user submits a form properly filled. Example: when they click the “submit” button or press the Enter key. To call a tag when a form is submitted, follow the same steps you followed to call a tag upon a click. Indicate your trigger’s name (ex: “account creation confirmation”), select the desired tag(s) and enter the code allowing targeting the form submission button on your page in the “CSS Selector” field.
This trigger allows calling tags when a user scrolls the page vertically or horizontally. In order to execute a tag on scrolling, you will need to enter your trigger’s name (ex: “30% vertical scrolling”), select the desired tag(s), choose the scrolling type (horizontal/vertical) from the dropdown menu, the expected scrolling and measuring unit (page percentage or pixels).
This trigger allows calling tags whenever a Commanders Act event function (tC.event.xxx) is identified on the page. If you wish to execute a tag on a custom eventm, please indicate your trigger’s name (ex: “add to cart click”), select the desired tag(s) and enter the implemented event function’s name (ex : “tC.event.add_to_cart”).
Perimeters and Constraints are two methods to conditionally fire your tags.
Under the Perimeter panel, tags fire if at least one rule is true.
Under the Constraints panel, tags fire if all rules are true.
The “Variables” tab allows you to create rules based on your data layer variables (external variables, internal variables, events attributes, events variables):
Condition and behavior
“If Variable Equals“: Tag activated if the variable equals the specified value.
“If Variable is Not Equal“: Tag activated if the variable differs from the specified value.
“OR Condition (One Variable)“: Tag activated if the variable equals at least one of the specified values.
“NAND Condition (One Variable)“: Tag activated if the variable equals two or more specified values.
“OR Condition (Up To Six Possible Variables)“: Tag activated if at least one of the variables equals the specified value.
“AND Condition (Up To Six Possible Variables)“: Tag activated if all the variables equal all the specified values.
“Greater than condition“: Tag activated if the variable is greater than the specified value.
“Less than condition“: Tag activated if the variable is less than the specified value.
“If Variable Contains“: Tag activated if the variable contains the specified value.
“If Variable Does Not Contain“: Tag activated if the variable does not contain the specified value.
“If Variable Matches“: Tag activated if the variable matches the specified value (regular expressions allowed: * to match any character and ^ for “variable begins with”).
“If Variable Doesn’t Match“: Tag activated if the variable does not match the specified value (regular expressions allowed: * to match any character and ^ for “variable begins with”).
In case of multiple values: enter all the values in the field separated by a comma ",". Don't use space between.
In which case using “external variables” for the mapping?
When you want to create a rule based on a tc_vars from the data layer implemented on your website.
Example: your technical team has implemented an env_country variable, and you want to create a rule based on it:
In which case using “internal variables” for the mapping?
When you want to create a rule based on a variable that you have created by yourself, from the internal variable interface.
In which case using “event variables” for the mapping?
When you want to create a rule based on a variable specific to an event.
Example: The following event is implemented in your site’s source code:
To call a tag only if the product name is “iphone”, you have to select the event variable named “product_name” and configure it in the following manner:
The “Cookie” tab allows you to create rules based on cookies you have previously created in the Commanders Act interface or which are available for your site’s domain name (first-party cookies).
Condition and behavior
“If Cookie Equals“: Tag activated if the cookie’s value equals the specified value.
“If Cookie Is Not Equal“: Tag activated if the cookie’s value differs from the specified value.
“If Cookie Contains“: Tag activated if the cookie’s value contains the specified value. In case of multiple values : enter all the values in the field separated by a comma ",". Don't use space between.
“If Cookie Doesn’t Contain“: Tag activated if the cookie’s value does not contain the specified value. In case of multiple values : enter all the values in the field separated by a comma ",". don't use space between.
Example with multiple values: In order to call a tag when your “consent_status” cookie equals “exempt” or "optin", you must select the “If Cookie Equals” rule and configure it in the following manner:
This tab allows you to create rules based on your site’s URLs (note: we recommend that you use rules based on variables instead of URLs since the rule will become obsolete if your URL changes in the future):
Condition and behavior
“If URL Equals“: Tag activated if the URL equals the specified value.
“If URL Contains“: Tag activated if the URL contains the specified value. In case of multiple values : enter all the values in the field separated by a comma ",". Don't use space between.
“If URL Doesn’t Contain“: Tag activated if the URL does not contain the specified value.
“If URL Matches“: Tag activated if the URL matches the specified value (regular expressions allowed: * to match any character and ^ for “variable begins with”).
“If URL Doesn’t Match“: Tag activated if the URL does not match the specified value (regular expressions allowed: * to match any character and ^ for “variable begins with”).
Example: to call a tag when your URL indicates that the user is on the product page (providing your product page URLs are all structured the same: https://www.site.com/$category$/$subcategory$/product_$product_ID$), you have to select the “If URL Matches” rule and configure it in the following manner:
This tab allows you to create rules based on browsers.
Condition and behavior
“If Browser Is“: Tag activated if the browser is (choose from the list).
“If Browser Is Not“: Tag activated if the browser is not (choose from the list).
This tab allows you to create rules based on the type of device.
Condition and behavior
“If Device / OS Is“: Tag activated if the device is (choose from the list).
“If Device / OS Is Not“: Tag activated if the device is not (choose from the list).
“If Device / OS Is Android Tablet“: Tag activated if the device is an Android tablet.
“If Device / OS Is Android Mobile“: Tag activated if the device is an Android mobile device.
“If Device / OS Is Not Android Tablet“: Tag activated if the device is not an Android tablet.
“If Device / OS Is Not Android Mobile“: Tag activated if the device is not an Android mobile device.
Example: to prevent a tag from being called on an Android mobile device, you must select the “If Device Is Not Android Mobile” rule and configure it:
This tab allows you to create rules based on the type of audience segments created in DataCommander.
Condition and behavior
“DataCommander OR condition (up to six variables)“: Tag activated if at least one of the audiences equals the specified value.
“DataCommander AND condition (up to six variables)“: Tag activated if all the audiences equal all the specified values.
“DataCommander Event activation“: Tag activated on an event
This tab allows you to create all types of advanced rules. For example, you can create sampling rules or even “Custom” rules:
Condition and behaviour
“Sampling (1/X) (Page Based)“: Tag activated in X% of page views.
“Sampling (1/X) (Session Based)” : Tag activated in X% of visits.
“Sampling (1/X) (Visitor Based)“: Tag activated for X% of visitors.
“(A or B or C or D or E) AND (F or G or H or I or J)“: Tag activated if at least one of the variables in the first group AND at least one of the variables in the second group equal the specified values.
“(A and B and C and D and E) AND (F or G or H or I or J)“: Tag activated if all the variables in the first group AND at least one of the variables in the second group equal the specified values.
“(A and B and C and D and E) OR (F and G and H and I and J)“: Tag activated if all the variables in the first group OR all the variables in the second group equal the specified values.
“(A and B and C and D and E) OR (F or G or H or I or J)“: Tag activated if all the variables in the first group OR at least one of the variables in the second group equal the specified values.
“(A different than VALUE1) OR (B different than VALUE2)“: Tag activated if the first variable is not equal to a value OR the second variable is not equal to a value.
“(A different than VALUE1) OR (B equals VALUE2)“: Tag activated if the first variable is not equal to a value OR the second variable is equal to a value.
“(A different than VALUE1) AND (B different than VALUE2)“: Tag activated if the first variable is not equal to a value AND the second variable is not equal to a value.
“(A different than VALUE1) AND (B equals VALUE2)“: Tag activated if the first variable is not equal to a value AND the second variable equals a value.
“In Array“: Tag activated if the variable is present in the variable array.
“In Sub Array“: Tag activated if the variable is present in a variable array key.
“Array Intersection”: Tag activated if two variables from two variable arrays are equal.
“Custom“: Custom rule (to define in JavaScript).
Example: In order to call a tag for 25% of site visitors, you must select the “Sampling (1/X) (Visitor Based)” and configure it in the following manner: