Hi Rohan.
"Rating 0 gets mapped to 'N/A' and I've not specified any default value.
The problem I'm having is that this data object variable is getting set to 'N/A' on all pages of the website other than the article page."
Apologies in advance if you already know what I'm about to write. I'm detailing the cause in case others reading this are wondering why this is happening.
Let's just call this variable 'myVar'.
You're seeing this probably due to the fact that in JavaScript, the value of 'zero' is equal to an empty string:
0 == ""
If you evaluate it, it will return true. So probably on your site on the non-article pages, this variable is being defined, but is empty. Since empty is equal to zero, you're getting N/A on all these pages.
As for a solution, if you just want to empty out this variable, the easiest way to do it is to:
1) Have a Set Value extension run right after it and scope it to the same tags. It's important they match in scoping and that this extension runs after the lookup table, or this won't work.
2) Then set a condition for running only on non-article pages like:
URL -- DOES NOT CONTAIN -- ARTICLE
That way on any page that is not an article, it will run
3) Set 'myVar' to text ""
That's just two quotes, or an empty string. This will blank out 'myVar' and send nothing on non-article pages.
If you want to outright delete this variable, it will require some custom written JavaScript. If this is what you're looking for, please contact your account manager so we can set that up for you. Hope this helps!