Setup guide
Last updated
Last updated
The TagPerformance tag must be included in each and every one of your containers.
If you have many containers on a given page and as many TagPerformance tags, only one hit containing information about your tags will be sent.
It is not necessary to place it in a particular order within your containers, as it will automatically execute two seconds after the DOM Loaded event, that is to say, after all the other tags have loaded.
In the tag library, select the “Commanders Act – TagPerformance” tag.
There is nothing to configure in the “EDIT” step: Generate a new container version and deploy it.
Advanced – Customizing the “TagPerformance” tag:
It is possible to force-measure a tag’s performance (for example, that of a tag outside the container, that of a custom tag whose URL paths are not recognized by TagCommander or that of a tag that is not present in the TagCommander tag library). If you wish to measure a new tag’s performance, place the following code block in the commented line (4 (1) tC.tagPerf.customPatterns.push({label:’Solution A’,p:’domain\.com.*js\.js’})
Example:
tC.tagPerf.customPatterns.push({label:’exelate’,p:’loadm.exelator.com’});
You can also add additional filters (in addition to default filters page type, container, device, OS and browser). If you wish to add a custom filter, place the following code block in the commented line (4): tc_vars[“custom_segment”] = #custom_segment#;
Note: You can only add one additional filter.
Example: to add a “page category” filter (tc_vars[“page_cat1”]) :
tc_vars[“custom_segment”] = tc_vars[“page_cat1”];
Finally, you can change the capturing method of the “Page Type” filter, which is available in the reports. This filter is based on the tc_vars[“env_template”] variable by default. If this variable is not available on your site, you can rely on a different variable by adding the following code block in the commented line (4) tc_vars[“env_template”] = #page_type#;
Example: if you wish to replace tc_vars[“env_template”] with tc_vars[“page_type”] :
tc_vars[“env_template”] = tc_vars[“page_type”] ;