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.
Instead of doPlugins
, the Web SDK uses onBeforeEventSend
with similar functionality.
onBeforeEventSend
manually implementing the Web SDKInstead of doPlugins
, the Web SDK uses onBeforeEventSend
with similar functionality. See Modifying events globally in the Web SDK documentation for more information.
// Set the trackingCode XDM field to "New value"
alloy("configure", {
"onBeforeEventSend": function(content) {
content.xdm.marketing.trackingCode = "New value";
}
})
There is not a dedicated field in the Adobe Analytics extension 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.