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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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


Level 2


    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

Thank you in advance

3 Replies


Level 10


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 -

Let me know if that works.



Level 2


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.



Kindly Help me.
Thank you .


Level 2

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