- Print
- DarkLight
- PDF
How C Plug-Ins Work
The following steps describe how Webtrends Analytics and Visitor Data Mart use C plug-ins.
- At defined points (tap points) in the analysis, Webtrends Analytics or the Event Database Loader calls the plug-in’s
xltTranslate
,xltTranslateVisitorHit
, andxltTranslateVisitorSession
functions. For more information about tap points, see “Analysis Tap Points,” below. - The plug-in receives an opaque pointer to the object (the log file record) on which it can perform translations.
- The plug-in uses the
ResolveName
callback function to obtain the value of specific field(s) in the object. - The plug-in uses the
ApplyTranslation
callback function to modify the value of specific field(s) in the object. - The analysis workflow continues using the translated object.
The plug-in modifies each log file record after Webtrends Analytics or the Event Database Loader has parsed the record but before it is filtered and analyzed. If the plug-in is for log file data, Webtrends Analytics or the Event Database Loader uses the modified records during analysis. If the plug-in is for Webtrends Data Warehouse data, the plug-in modifies the log file records before they are loaded into the database.
Creating C Plug-Ins
This section describes what you need to do to build a Webtrends C plug-in.
To download the required header files:
- In the left pane of Administration, click Install Components > Accessories.
- Click Data Conduit Header Files.
To create a plug-in:
- Create a DLL using the C plug-in API discussed in this chapter. Your plug-in should reference the
translate.h
andstringref.h
files. - Copy your plug-in
DLL
file in the Webtrendsinstallation directory\storage\component\plugin
.
Including C Plug-Ins in Analysis
After you create your plug-in, you can enable it globally for all profiles or for individual profiles.
To include a plug-in in a profile:
Open the
WLP
file for the profile which is located in the Webtrendsinstallation directory/storage/config/wtm_wtx/datfiles/profiles/
.WLP
files are saved according to the Profile File Name setting. You can determine whichWLP
file corresponds to your profile by editing the profile in Administration and viewing Profile File Name setting when you click General.If your plug-in is to be used with a Standard Analysis profile or a Visitor Data Mart profile, add an entry to the
plugin
key in the[profile]
section using the following syntax:
PlugIn=filename1.dll
wherefilename1
is the name of your data plug-in file. Separate multiple entries with a comma.If your plug-in is to be used with a Basic Analysis profile, add an entry to the
ftplugin
key in the[profile]
section using the following syntax:FTPlugIn=filename1.dll
When the profile is analyzed, the first data plug-in specified translates the records, followed by any other data plug-ins that are specified.
To include the plug-in in all profiles:
Open the
wtx_wtx.ini
file which is located in the Webtrendsinstallation directory\storage\config\wtm_wtx directory
.If your plug-in is to be used with Standard Analysis profiles or Visitor Data Mart profiles, add an entry to the
plugin
key in the[profile]
section using the following syntax:PlugIn=filename1.dll
where
filename1
is the name of your data plug-in file. Separate mutliple entries with a comma.If your plug-in is to be used with Basic Analysis profiles, add an entry to the
ftplugin
key in the[profile]
section using the following syntax:
FTPlugIn=filename1.dll