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

Obtaining value from Data Attributes as data elements in DTM

Avatar

Avatar
Validate 1
Level 2
haritikam738202
Level 2

Likes

13 likes

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
haritikam738202
Level 2

Likes

13 likes

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
haritikam738202
Level 2

24-09-2018

Hi,

I am trying to obtain the value of the following data attributes dynamically in a prop on the site www.eonline.com

Screen Shot 2018-09-24 at 2.57.03 PM.png

I have defined the Data Element value as below:

Screen Shot 2018-09-24 at 2.56.44 PM.png

and set the Event based rule shown below:

Screen Shot 2018-09-24 at 2.56.31 PM.png

Site link: www.eonline.com

However, when I click on the element - a click event fires but ONLY shows value of the first click and does not change value as per the change in the Data Attributes

Any help will be greatly appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 3
gokula
Level 3

Likes

25 likes

Total Posts

90 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Ignite 3
Ignite 1
View profile

Avatar
Validate 1
Level 3
gokula
Level 3

Likes

25 likes

Total Posts

90 posts

Correct Reply

7 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Ignite 3
Ignite 1
View profile
gokula
Level 3

26-09-2018

Hi,

better instead of creating data element, can you please try below. It might be help you in your scenario.

The easiest way to capture the values of a data attribute against an eVar or prop on the element clicked using DTM is to set the input as the following:

prop38 = %this.getAttribute(data-attributename)%

More detail on data attributes can be found at http://www.digitalbalance.com.au/our-blog/event-based-tracking-using-html5-custom-data-attributes/

Hope this helps you.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
haritikam738202
Level 2

Likes

13 likes

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
haritikam738202
Level 2

Likes

13 likes

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
haritikam738202
Level 2

26-09-2018

Thank you for the response! This definitely worked