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

can't able to assign 0 to Data Element in DTM

Avatar

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
rajarajanr71853
Level 2

15-10-2015

Hi,

    I tried to get the zero (0) from data layer to DTM Data Element using JS object. But the Data Element is assigning the default value instead of zero(0). And I checked my Data Layer object with JS alert, its working fine. I dont know where it went wrong.

Eg: var dlayer.count = 0; - datalayer object 


Kindly Help Me
Urgent 

Thank you in advance

Replies

Avatar

Avatar
Validate 250
Employee
TanmayMathur
Employee

Likes

245 likes

Total Posts

1,193 posts

Correct Reply

422 solutions
Top badges earned
Validate 250
Validate 100
Validate 25
Validate 50
Validate 10
View profile

Avatar
Validate 250
Employee
TanmayMathur
Employee

Likes

245 likes

Total Posts

1,193 posts

Correct Reply

422 solutions
Top badges earned
Validate 250
Validate 100
Validate 25
Validate 50
Validate 10
View profile
TanmayMathur
Employee

15-10-2015

Hi,

You can try putting the 0 in double quotes which will specify it as a string. The number 0 would specify it as an empty string instead.

Here is a related article as well - http://stackoverflow.com/questions/7615214/in-javascript-why-is-0-equal-to-false-but-when-tested-by-...

Let me know if that works.

TM

Avatar

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
rajarajanr71853
Level 2

15-10-2015

Hi,

Thank you. Its working fine.
But whenever I try to map Data Elements with Page Load Rule Condition I am getting the below mismatch Rule not met.

SATELLITE: Condition function (){return _satellite.textMatch(_satellite.getVar("Count"),/^[0]$/i)} for rule "count" not met.

 

And its working fine if i call the function manually. But the Rule is not fired. Please see the below snippet.

_satellite.getVar("Count")

"0"
_satellite.textMatch(_satellite.getVar("Count"),/^[0]$/i)
true

Kindly Help me.
Thank you .

Avatar

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
rajarajanr71853
Level 2

Likes

8 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
rajarajanr71853
Level 2

15-10-2015

Hi TanmayM
            A gentle reminder . Kindly Help Me on the above Issue (Urgent).
Thank you in advance.
Rajan