The doPlugins
variable acts as a ‘last call’ to set values in your implementation. If usePlugins
is enabled, it automatically runs just before any type of image request is compiled and sent to Adobe, including:
t()
) callstl()
) calls, including automatic download links and exit linksUse the doPlugins
variable to call plug-in code and set final variable values just before an image request is compiled and sent to Adobe.
There is not a dedicated field in Launch to use this variable. Use the custom code editor, following AppMeasurement syntax.
Set the s.doPlugins
variable to a function containing desired code. The function automatically runs when you make a tracking call.
s.doPlugins = function() {/* Desired code */};
Set a function to the doPlugins
variable only once in your implementation. If you set the doPlugins
variable more than once, only the most recent code is used.
// Set eVar1 to the web page's title
s.doPlugins = function() {
s.eVar1 = window.document.title;
};
// Use the getPreviousValue plug-in (requires plug-in code outside the function)
s.doPlugins = function() {
s.eVar1 = s.getPreviousValue(s.pageName,'gpv_pn');
}
Previous versions of AppMeasurement had slightly different doPlugins()
code. Adobe recommends using the above format as a best practice.