Adobe Analytics extension, propagate custom code to all rules



I have a question about defining props/evars through Custom Code in Adobe Analytics extension. Particularly, how to propagate values not only for s.t() (pageview rule), but also for (clicks).


Site configuration

I have a site with dataLayer. When a user clicks on some button, we push an event in the dataLayer.

Adobe Launch configuration

Installed two extensions:

- Data Layer Manager

- Adobe Analytics

Adobe Analytics extension settings:

Library Management: Manage the library for me  - Checked: Make tracker globally accessible

Configure tracker using custom code:


s.doPlugins=function(s) {




/* Plugin: getNewRepeat 1.2 - Returns whether user is new or repeat */

s.getNewRepeat=new Function("d","cn",""

+"var s=this,e=new Date(),cval,sval,ct=e.getTime();d=d?d:30;cn=cn?cn:"





Execute custom code: After other setting are applied

Added two rules:

1. Pageview


2. Button click


*Custom code added only in Adobe Analytics extension. In action Set variables, sets only events.

When the page is loaded => the pageview tag fires with eVar10 = New, eVar11 = Test.

Click on the button => the click tag fires, but eVar's don't appear.

I tried to change fire condition for button click from dataLayer push to css selector - nothing changed.

Could you please explain, how to populate eVars with the values from Global custom code on this button click?

Do I need to add custom code with all plugins to each rule?

Accepted Solutions (1)

Accepted Solutions (1)




Then it's likely because linkTrackVars is not set in the "Set Variables" action of the Button click rule. Add the following line to Custom Code of the Set Variables action: