Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Dynamic Tag Manager

666111666
Level 2
Level 2

I have two doubts to start working  with this tool

How can I populate an evar or a prop whith the value of a Data Element?.As I see in the  page rules edit interface I´m only able to put a fixed string value.

And how can I populate s.products variable? (without coding).

Thanks in advance

1 Accepted Solution
Erika_Barber
Correct answer by
Employee
Employee

You can type % into the field where you would like to use the Data Element.  You will see a drop-down list appear with the data elements you've created.  Select the one you want (or keep typing to narrow down the list).  You'll see that the data element is referenced in between percent signs.  Now, when the rule fires, that value will be dynamically populated based on your definition of the Data Element.  

View solution in original post

7 Replies
Erika_Barber
Correct answer by
Employee
Employee

You can type % into the field where you would like to use the Data Element.  You will see a drop-down list appear with the data elements you've created.  Select the one you want (or keep typing to narrow down the list).  You'll see that the data element is referenced in between percent signs.  Now, when the rule fires, that value will be dynamically populated based on your definition of the Data Element.  

View solution in original post

Erika_Barber
Employee
Employee

Also, to use a Data Element in a custom code section, you can use _satellite.getVar('data_element_name')

For example:

s.products = _satellite.getVar('data_element_name');

matthewc1813489
Level 1
Level 1

Erika Barber wrote...

Also, to use a Data Element in a custom code section, you can use _satellite.getVar('data_element_name')

For example:

s.products = _satellite.getVar('data_element_name');

 

 

This doesn't seem to be working for me with a direct call rule. When I fire a Direct Call Rule, the s object isn't available. Even if I try to access it via window.s it isn't available.

I understand that the s object is available in the custom page code that runs in the tool just prior to sending the page call. But when using an asynchronous call the s object is not available.

How can we set the s.products variable using a Direct Call Rule?

toby_ho
Level 1
Level 1

Was the direct-call rule called from Javascript as the page loads or due to a use interaction?

matthewc1813489
Level 1
Level 1

One thing that we have discovered is that there seems to be a difference in the availability of the s object if we use appMeasurement versus H.26 s_code.

The workaround has been one of two things:

1. Re-instantiate the appMeasurement object in the Managed Code section, then set the report suite again in the Customize Page Code area of the Adobe Analytics Tool Settings, and put it into an s variable. 

2. Use H.26 instead of appMeasurement

Regardless of how we approach this problem, the s object just isn't available in many places where we might put code. In some instances, we can find the s object by setting s = window.s.

I'm wondering if there is a spot inside the Satellite object where we can put events and variables that need to be put into the s object whenever it is available in case there is a timing or scope problem?