Hey Jim,
You are correct. Not all plugins are supported with the AppMeasurement Code, but the code above isn't using any plugins. So you should be safe.
The only way to get this to work is to use the doPlugins section. Since the utag.link or utag.view function isn't getting triggered on click of download links, putting this code into a javascript extension, without the doPlugins function, won't work because the code will never get called.
However, the SC library calls the doPlugins function automatically on click of downloads which is why this code has to be in there.
This is what you can use in a JS Extension scoped to the AppMeasurement Tag:
/* Plugin Config */
s.usePlugins=true
function s_doPlugins(s) {
if(s.linkType=="d"){
var ind = s.linkURL.lastIndexOf('/')+1;
var val = s.linkURL.substring(ind);
s.linkTrackVars = "eVar1,prop1";
s.pageName = val;
s.eVar1 = s.prop1 = val;
}
}
s.doPlugins=s_doPlugins
That should do the trick, and since there aren't any plugins being used it should be safe from the unsupported plugins. Also, the "if" statement will only allow the code to run on download links. So it won't be running unnecessarily.