The data insertion method of integration is used to associate website content and customer experience data, delivered by third-party and/or internal systems, with Tealeaf captured sessions, where the information to integrate is not included in the HTTP stream that is captured by Tealeaf.
The data association is accomplished by making a request, which includes the data to be associated as query string parameters, for an image file located on the web infrastructure that is automatically captured by Tealeaf.
tl_img.html
.For performance and data optimization reasons, by default the Tealeaf system filters all requests for common binary formats, such as .gif
, and drops them from the captured data stream. To bypass this filter, the .html
extension is used for the image file, ensuring that the request and all included data pass through the Tealeaf system.
The URL for the image request is as follows:
http://<HostPathToImage>/tl_img.html?Source=<Source>&Event=<Event>&SidName=
<SidName>&SidValue=<SidValue>&Custom1=<Custom1>&Custom2=<Custom2>
Parameter | Required? | Type | Description |
---|---|---|---|
HostPathToImage |
Y | [string] | Path to the tl_img.html file on the target web infrastructure. |
Source |
N | [string] | Used to identify the third-party or internal system that is generating the request. |
Event |
N | [string] | Used to identify the type of event of the request (for example, start , complete ). |
SidName |
N | [string] | Used to identify the name of the cookie that is used for sessionization in the Tealeaf system.
Note: If session cookie name/value pairs are not automatically associated with the request. If they are overwritten, then the
SidName parameter is required to associate the request with its originating session. Otherwise, the image request will become a one-hit session in Tealeaf and might be dropped. |
SidValue |
N | [string] | Used to identify the value of the cookie that is used for sessionization in the Tealeaf system.
Note: If session cookie name/value pairs are not automatically associated with the request or if they are overwritten, then the
SidValue parameter is required to associate the request with its originating session. Otherwise, the image request becomes a one-hit session in Tealeaf and might be dropped. |
Examples of cxConnect integration through data insertion
For all examples, the host path Host_Path_To_Image
is defined as example.company.com/images
. These JavaScript™ functions are used for the following:
- Get the cookie value used for sessionization where needed.
- Dynamically create the image request.
<script type="text/javascript">
<!--
// Begin example integration
// Function retrieves the specified cookie value used for sessionization.
function TLGetCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
// Function dynamically creates image request.
function TLSendRemoteEvent(hostPath, source, event, sidName, sidValue, params)
{
var src = 'http://' + hostPath + '/tl_img.html?';
src += ((source.length >0) ? ('&Source=' + source) : '');
src += ((event.length >0) ? ('&Event=' + event) : '');
src += ((sidname.length > 0) ? ('&sidname=' + sidname) : '');
src += ((sidvalue.length > 0) ? ('&sidvalue=' + sidvalue) : '');
src += ((params.length > 0) ? ('&'+ params) : '');
document.write('<img border="0" name="tl_img" width="1" height="1"
src="'+src+'">');
}
// End example integration
-->
</script>
Example: Survey
Create two separate requests to signify the 1) start and 2) completion of a survey delivered by a third-party Voice-Of-Customer (VOC) provider. In both cases, the session cookie information is automatically associated with the request.
Request 1: start
<script type="text/javascript">
TLSendRemoteEvent('example.tealeaf.com/images', 'VOC_Provider',
'SurveyInitiated', '', '', 'SurveyId=Survey01');
</script>
Request 2: completion
<script type="text/javascript">
TLSendRemoteEvent('example.tealeaf.com/images', 'VOC_Provider',
'SurveyCompleted', '', '', 'SurveyId=Survey01');
</script>
Example: Test content
Create a request to associate test content delivered by a third-party Multivariate Testing (MVT) provider. In this case, the session cookie information is automatically associated with the request.
<script language="JavaScript" type="text/javascript">
TLSendRemoteEvent('example.company.com/images', 'MVT_Provider',
'CreativeDisplayed', '', '',
'LocationId=TestLocation01&CampaignId=123&CreativeId=4567');
</script>
Example: Application content
Create a request to associate application content delivered by an internal account statement imaging system. In this case, the session cookie information (JSessionId=6ADC032CE62410E601D18F0E83F2F02A
) needs to be supplied, as it is not automatically associated with the request.
<script language="JavaScript" type="text/javascript">
var TLSessionizationName='JSessionId';
var TLSessionizationValue=TLGetCookie(TLSessionizationName);
TLSendRemoteEvent('example.tealeaf.com/images', 'Statement_Imaging',
'StatementDelivered', TLSessionizationName,
TLSessionizationValue, 'AccountDate=2008-03-03&
SourceDB=MF987&ImageId=ABC123DEF456');
</script>
Configuring Tealeaf
Privacy.cfg must be configured and Tealeaf events must be created to use the website content and customer experience data that is associated with sessions through the data insertion integration method.
Events
In addition to configuring Privacy.cfg, you must create events in the Event Manager to leverage the website content and customer experience data that has been associated with sessions via the data insertion integration method. A library of events based on prebuilt partner integrations is available for import.
Privacy.cfg updates
To complete the configuration of the data insertion integration method, the following rules and actions must be included and enabled in the Privacy.cfg
file on the Tealeaf processing server.
[Rule6]
Enabled=True
Tests=TLIMG_UrlTest
Actions=TLIMG_SetResponseType, TLIMG_SetResponseContentType,
TLIMG_SetCaptureType, IntegrationReplaceJS,
[Rule7]
Enabled=True
TestOp=AND
Tests=TLIMG_UrlTest, TLIMG_SidValueTest
Actions=TLIMG_SetTLTSID
#----------------------------------------------------------------------------
# Data insertion integration via tl_img.html request
#
# Actions are required for accurate replay
#
# TLIMG_UrlTest - constrains the actions to the tl_img.html URL
# TLIMG_SetResponseType - changes to the proper type
# TLIMG_SetCaptureType - changes to the proper capture type
# TLIMG_SidValueTest - test for the existence of the SidValue
# parameter
# TLIMG_SetTLTSID - forces the hit to be associated with changes to the
# proper capture type
#
[TLIMG_UrlTest]
ReqField=URL
ReqOp=EQ
ReqVal=/tl_img.html
[TLIMG_SetResponseType]
Action=ReqSet
ReqSetSection=env
ReqSetField=ResponseType
ReplaceString=image/gif
[TLIMG_SetCaptureType]
Action=ReqSet
ReqSetSection=iamie
ReqSetField=CaptureType
ReplaceString=3
[TLIMG_SetResponseContentType]
Action=ReqSet
ReqSetSection=ResponseHeaders
ReqSetField=Content-Type
ReplaceString=image/gif
[TLIMG_SidValueTest]
ReqField=SIDVALUE
ReqOp=EQ
ReqVal=
NOT=True
[TLIMG_SetTLTSID]
Action=ReqSet
Section=urlfield
Field=SidValue
ReqSetSection=iamie
ReqSetField=TLTSID
MD5=False