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, andxltTranslateVisitorSessionfunctions. 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
ResolveNamecallback function to obtain the value of specific field(s) in the object. - The plug-in uses the
ApplyTranslationcallback 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.handstringref.hfiles. - Copy your plug-in
DLLfile 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
WLPfile for the profile which is located in the Webtrendsinstallation directory/storage/config/wtm_wtx/datfiles/profiles/.WLPfiles are saved according to the Profile File Name setting. You can determine whichWLPfile 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
pluginkey in the[profile]section using the following syntax:
PlugIn=filename1.dll
wherefilename1is 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
ftpluginkey in the[profile]section using the following syntax:FTPlugIn=filename1.dllWhen 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.inifile 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
pluginkey in the[profile]section using the following syntax:PlugIn=filename1.dllwhere
filename1is 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
ftpluginkey in the[profile]section using the following syntax:
FTPlugIn=filename1.dll