- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-10-2013 07:51 AM
Solved! Go to Solution.
10-10-2013 08:19 AM
10-10-2013 08:20 AM
05-24-2017 07:24 AM - edited 05-24-2017 07:38 AM
Hi,
Can I use "is not populated" to determine events where the parameter does not exist?
We have a tag say variable_1 that only executes on certain conditions. That is, it is absent from the set of tags for a particular page when it does not meet the criteria. I've added an extension that assigns an event_label=not_event1 where the condition is variable_1=is not populated.
Will the "is not populated" condition capture the events where variable_1 does not execute? Or do I need to use "is not defined" for this particular example.
Thanks for your help!
Update: I checked it using a web debugging tool and the "is not defined" should be used if you want to track tags/parameters that do not execute. Sorry, I should have done that before posting my question here.
05-24-2017 08:19 AM
@franzine_co just wanted to confirm that what you found is correct!
For future readers, let's assume you have the following object:
utag_data = {
page_name : "home page",
page_type : ""
}
Is defined:
page_name would evaluate to true, because the variable is declared in the utag_data object
customer_id would evaluate to false, because the variable is not declared in the utag_data object
Is not defined:
page_name would evaluate to false, because the variable is declared in the utag_data object
customer_id would evaluate to true, because the variable is not declared in the utag_data object
Is populated:
page_name would evaluate to true, because page_name has a value of "home page"
page_type would evaluate to false, because page_type has no value - meaning it's an empty string
Is not populated:
page_name would evaluate to false, because page_name has a value
page_type would evaluate to true, because page_type has no value
Copyright All Rights Reserved © 2008-2023