The ADC processor pipeline is responsible for inserting calls to the Click-to-Call JavaScript libraries. To enable the ADC processor pipeline, the web.xml
file for store.war
includes the following:
<filter> <filter-name>ADCDataInsertFilter</filter-name> <filter-class> atg.filter.ConditionalDelegatingFilter </filter-class> <init-param> <param-name>targetFilter</param-name> <param-value> atg.adc.filter.ADCDataInsertFilter </param-value> </init-param> <init-param> <param-name>mimeTypes</param-name> <param-value>text/html,dynamo-internal/html</param-value> </init-param> </filter> <filter-mapping> <filter-name>ADCDataInsertFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
These settings specify that the atg.filter.ConditionalDelegatingFilter
should run the atg.adc.filter.ADCDataInsertFilter
if it is present. The ADCDataInsertFilter
invokes the ADC processor pipeline. The filter is part of the ADC
module, which is automatically included in the assembled EAR file when you specify the DCS.ClickToConnect
module.
The processor pipeline inserts in the <head>
tag of the HTML page calls to scripts for importing the Click-to-Call JavaScript libraries:
<script type="text/javascript" src="//static.atgsvcs.com/js/atgsvcs.js"></script> <script type="text/javascript" src="/clicktoconnect/scripts/c2c.js"></script>
In addition, the pipeline inserts a script in the <body>
tag of the page that specifies variables that are used by Click-to-Call. For example:
<script type="text/javascript"> <!-- if(ATGSvcs != null) { ATGSvcs.setUOID(200106298304); } var _atg_estara_call_token = "c2c4.5.0.SOYqEhmXS70R3LhAt1hmUPJRYXg"; var _atg_estara_locale = "en_US"; var _atg_estara_site = "storeSiteUS"; //--> </script>
The _atg_estara_call_token
variable is used to associate the customer’s session with the information displayed to the customer service agent. The other variables make it possible to vary Click-to-Call behavior based on the current locale and site.